kafka shell命令

1、查看主题命令

./kafka-topics.sh --list --zookeeper  bigdata1:2181,bigdata2:2181,bigdata3:2181

2、模拟生产者生产消息

./kafka-console-producer.sh --broker-list bigdata1:6667,bigdata2:6667,bigdata3:6667 --topic alert

3、模拟消费者消费消息

./kafka-console-consumer.sh --from-beginning --topic alert  --zookeeper bigdata1:2181,bigdata2:2181,bigdata3:2181

 

posted @ 2020-10-12 14:41  蓝色土耳其  阅读(163)  评论(0编辑  收藏  举报