Problem

Recently, I installed Apache Kafka on the Ubuntu system. When tried to run the consumer console script, I found the error message that “zookeeper is not a recognized option”.

Advertisement
./bin/kafka-console-consumer.sh --topic testTopic --zookeeper localhost:9092 
zookeeper is not a recognized option
Option                                   Description
------                                   -----------
--bootstrap-server 
--consumer-property                            properties in the form key=value to
...
...

Solution

After searching a bit time, I visited to Apache Kafa QUICKSTART guide. Here I found the solution that Kafka has removed --zookeeper option and replaced it with a new option --bootstrap-server .

So the new command would be like:

./bin/kafka-console-consumer.sh --topic testTopic --bootstrap-server  localhost:9092 

Hope this will help you to resolve the Kafka issue.

Share.

1 Comment

  1. Saheb Ettabaa Karim on

    Use the bootstrap-server instead
    kafka-topics.sh –bootstrap-server 127.0.0.1:2181 –topic first_topic –create –partitions 3 –replication-factor 1
    Good luck

Leave A Reply


Exit mobile version