English 中文(简体)
“主”读物例外。 不予承认的选择性:动物不是一种公认的选择
原标题:Exception in thread "main" joptsimple.UnrecognizedOptionException: zookeeper is not a recognized option

我是卡夫卡和oke夫塞的新鲜事,我正试图提出一个议题,但我正在发现这一错误——

Exception in thread "main" joptsimple.UnrecognizedOptionException: zookeeper is not a recognized option
        at joptsimple.OptionException.unrecognizedOption(OptionException.java:108)
        at joptsimple.OptionParser.handleLongOptionToken(OptionParser.java:510)
        at joptsimple.OptionParserState$2.handleArgument(OptionParserState.java:56)
        at joptsimple.OptionParser.parse(OptionParser.java:396)
        at kafka.admin.TopicCommand$TopicCommandOptions.<init>(TopicCommand.scala:517)
        at kafka.admin.TopicCommand$.main(TopicCommand.scala:47)
        at kafka.admin.TopicCommand.main(TopicCommand.scala)

我正在利用这一指挥力来创造这个主题——

.inwindowskafka-topics.bat --create --zookeeper localhost:2181 --replication-factor 1 --partions 1 --topic TestTopic
最佳回答

Kafka的新版本(2.2+)不再需要动物园地连接。

-zookeeper localhost:2181

它提出了以下例外,同时设立了一个专题。

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

Instead, add Kafka Broker --bootstrap-server localhost:9092 connection string.

./kafka-topics.sh --create --topic test-topic --bootstrap-server localhost:9092 --replication-factor 1 --partitions 4
问题回答

In the latest version kafka_2.12-3.1.0 (2022) after unzipping and setting the properties and logs. keep the Kafka folder on the C drive and always run the command prompt with run as administrator . The .bat file is for windows

第1步兵营

C:kafkainwindows>zookeeper-server-start.bat ....configzookeeper.properties

附件二

C:kafkainwindows>kafka-server-start.bat ....configserver.properties

第3条

C:kafkainwindows>kafka-topics.bat --create --topic tutorialspedia --bootstrap-server localhost:9092

http://www.un.org/Depts/DGACM/index_french.htm

专题清单

C:kafkainwindows>kafka-topics.bat --list --bootstrap-server localhost:9092

tutorialspedia

Kafka Created Topics forWindows:

kafka-topics.bat --create --topic learningkafka --bootstrap-server localhost:9092

在专题建立之后,我们可以核对卡夫卡名单:

kafka-topics.bat --list --bootstrap-server localhost:9092

卡纳克法 专题:

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

Hmm, thank you, i can run with

~/kafka/bin/kafka-topics.sh www.un.org/Depts/DGACM/index_chinese.htm -- 重复因素 页: 1 纽约总部 Tutorial Topic





相关问题
Kafka stream for processing event which takes long time

I have a Spring Boot Kafka Stream application that reads the records do some HTTP calls and transform the record into another form. This transform record is then sent to the producer. final KStream<...

热门标签