首页 > 其他 > 详细

run kafka local

时间:2021-09-10 00:21:05      阅读:34      评论:0      收藏:0      [点我收藏+]
Q: How to run kafka local
download kafka http://kafka.apache.org/downloads

start zookeeper
$ bin/zookeeper-server-start.sh config/zookeeper.properties
start kafka
$ bin/kafka-server-start.sh config/server.properties
or JMX_PORT=9988 bin/kafka-server-start.sh -daemon config/server.properties
start kafka producer
$ bin/kafka-console-producer.sh --broker-list localhost:9092 --topic topicName
start kafka consumer
$ bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic topicName
bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic topicName --from-beginning --consumer-property group.id=test-group
bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic topicName --consumer-property group.id=test-group
cat kafka-consumer-groups
bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --list
describe kafka-consumer-group
bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group test-group
describe topic
bin/kafka-topics.sh --describe --zookeeper localhost:2181 --topic topicName
delete topic
bin/kafka-topics.sh --delete --zookeeper localhost:2181 --topic topicName

run kafka local

原文:https://www.cnblogs.com/tonggc1668/p/15246740.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!