-
This is not a bug. I was trying to implement the functionalities of the gem ruby-kafka. When trying out one of them(fetch_from_partition), I came across the connection_builder. I am finding it hard to understand more about the connection_builder. Any help here is appreciated! Below is the code snippet I was trying. I am sure that I am not doing it right here. Any help is appreciated.
Steps to reproducebp = Kafka::BrokerPool.new(connection_builder: "localhost:9092", logger: Rails.logger)
cluster = Kafka::Cluster.new(seed_brokers: ["localhost:9092"], logger: Rails.logger, resolve_seed_brokers: false, broker_pool: bp)
operation = Kafka::FetchOperation.new(cluster: cluster, logger: Rails.logger, min_bytes: 1,max_wait_time: 10)
operation.fetch_from_partition("test-drive", 6,offset: :latest, max_bytes: 100000)
operation.execute Expected outcomeFetches messages from one or more partitions. Actual outcomeNoMethodError (undefined method `hostname' for "localhost:9092":String) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
ConnectionBuilder
is a class that builds connections. You can't just pass in a string.