本文共 413 字,大约阅读时间需要 1 分钟。
使用控制台的生产者脚本生产消息
➜ bin sh kafka-console-producer.sh --broker-list localhost:9092 --topic test>one>two>three
使用控制台的消费者脚本消费消息
➜ bin sh kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginningonetwothree
列出所有的consumer
sh kafka-consumer-groups.sh --bootstrap-server localhost:9092 --list
查询所有的topic
sh kafka-topics.sh --list --zookeeper 192.168.10.151:2181
转载地址:http://mqqab.baihongyu.com/