zookeeper is not a recognized option when executing kafka-console-consumer.sh

xingbin :

I'm learning how to use kafka from this link(except I'm using port 2182 in zookeeper),

but it shows:

zookeeper is not a recognized option

after executing:

sudo ./bin/kafka-console-consumer.sh --topic test --zookeeper localhost:2182

How to fix it?

Env:

kafka_2.11-2.1.0
zookeeper-3.4.10
xingbin :

I found the answer in the official site.

Option zookeeper is deprecated, use --bootstrap-server instead.

Now it works:

bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test --from-beginning

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=35218&siteId=1