zookeeper is not a recognized option


zookeeper is not a recognized option

 

创建消费者时候报错:

.\bin\windows\kafka-console-consumer.bat --zookeeper localhost:2181 --topic ads_log 
zookeeper is not a recognized option

问题原因:

新版本kafka中,--zookeeper这种启动方式已删除。

解决办法:

0.90版本之后启动消费者的方法如下:

.\bin\windows\kafka-topics.bat  --bootstrap-server localhost:9092 --topic ads_log --from-beginning

 

 --bootstrap-server 参数

 创建主题:都可以

.\bin\windows\kafka-topics.bat --create  --bootstrap-server localhost:9092 --replication-factor 1 --partitions 3 --topic ads

.\bin\windows\kafka-topics.bat --create  --zookeeper localhost:2181 --replication-factor 1 --partitions 3 --topic ads

 

完结!

 

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM