0
./bin/kafka-console-consumer.sh --zookeeper 127.0.0.1:2181 --topic test

./bin/kafka-console-producer.sh --broker-list 127.0.0.1:9092 --topic test

Why to consume kakfa needed zookeeper? could I consume kafka from brokers ?

Patrick Trentin
  • 7,126
  • 3
  • 23
  • 40

1 Answers1

0

--zookeeper is an outdated option (for the old Consumer).

Use the newer --bootstrap-server option with kafka-console-consumer.

More info: http://kafka.apache.org/documentation/#newconsumerconfigs

Robin Moffatt
  • 30,382
  • 3
  • 65
  • 92