KafkaProxyRestClient - a Ruby gem for the Kafka REST Proxy API.
This SDK is automatically generated by the Swagger Codegen project:
- API version: 0.1.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.RubyClientCodegen
To build the Ruby code into a gem:
gem build kafka_rest_proxy_client.gemspecThen either install the gem locally:
gem install ./kafka_rest_proxy_client-1.0.0.gemgem 'kafka_rest_proxy_client', git: 'https://github.com/mzaccari/kafka-rest-proxy-ruby-client.git'
Please follow the installation procedure and then run the following code:
# Load the gem
require 'kafka_rest_proxy_client'
KafkaProxyRestClient.configure do |config|
config.host = "127.0.0.1:8082"
config.scheme = "http"
config.base_path = "/"
end
topic_name = "topic_name_example"
api_client = KafkaProxyRestClient::ProducerApi.new
record = KafkaProxyRestClient::Record.new(value: { hello: 'world' })
request = KafkaProxyRestClient::ProducerRequest.new(records: [record])
begin
result = api_client.publish(topic_name, request)
p result
rescue KafkaProxyRestClient::ApiError => e
puts "Exception when calling ProducerApi->topics_topic_name_post: #{e}"
endAll URIs are relative to https://localhost
| Class | Method | HTTP request | Description |
|---|---|---|---|
| KafkaProxyRestClient::ProducerApi | publish | POST /topics/{topic_name} |
- KafkaProxyRestClient::ProducerRequest
- KafkaProxyRestClient::ProducerResponse
- KafkaProxyRestClient::Record
All endpoints do not require authorization.