I am trying to use ruby-kafka gem to send messages but i am getting the error Could not connect to any of the seed brokers
kafka::ConnectionError: Could not connect to any of the seed brokers:
- kafka:broker1: Connection error EOFError: EOFError
- kafka:broker2: Connection error EOFError: EOFError
- kafka:broker3: Connection error EOFError: EOFError
- kafka:broker4: Connection error EOFError: EOFError
https://github.com/zendesk/ruby-kafka
I created krb5.keytab file for authentication.
kafka = Kafka.new(["broker1",
"broker2",
"broker3",
"broker4"
],
sasl_gssapi_keytab: '/etc/krb5.keytab')
kafka.deliver_message("Hello, World!", topic: "TestTopic")
Does anyone know why i am getting that error?
You might be using Kafka 0.10. From version 0.7.x, the support for Kafka 0.10 is dropped, in the replacement of new Record Batch format in kafka 0.11. So, please use 0.6.x branches, or upgrade your kafka version. As described here:
https://github.com/zendesk/ruby-kafka/issues/672