-
Notifications
You must be signed in to change notification settings - Fork 333
Closed
Description
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.
- Version of Ruby: 3.0.0
- Version of Kafka: 2.8.1
- Version of ruby-kafka: 1.4.0
Steps to reproduce
bp = 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.executeExpected outcome
Fetches messages from one or more partitions.
Actual outcome
NoMethodError (undefined method `hostname' for "localhost:9092":String)
Metadata
Metadata
Assignees
Labels
No labels