其他分享
首页 > 其他分享> > Exception in thread "main" joptsimple.UnrecognizedOptionException: zookeeper is not a reco

Exception in thread "main" joptsimple.UnrecognizedOptionException: zookeeper is not a reco

作者:互联网

在创建主题时,

在较新版本(2.2 及更高版本)的 Kafka 不再需要 ZooKeeper 连接字符串,即- -zookeeper localhost:2181。使用 Kafka Broker的 --bootstrap-server localhost:9092来替代- -zookeeper localhost:2181。

即使用命令:

bin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic test

替代命令:

bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test

 

标签:Exception,joptsimple,thread,--,topics,zookeeper,9092,2181,localhost
来源: https://www.cnblogs.com/skzxc/p/15709493.html