美文网首页
zookeeper is not a recognized op

zookeeper is not a recognized op

作者: randliu | 来源:发表于2018-01-17 16:47 被阅读0次

1. 启动 zookeeper:

 ./bin/zookeeper-server-start.sh config/zookeeper.properties 

2.启动 kafka

./bin/kafka-server-start.sh config/server.properties 

3. 消费端

(base) bogon:kafka_2.12-2.2.0 rand$ bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning

zookeeper is not a recognized option

已经过时了。替换为:

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

4. 生产端:

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

5. 创建topic

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

相关文章

网友评论

      本文标题:zookeeper is not a recognized op

      本文链接:https://www.haomeiwen.com/subject/tiyuoxtx.html