kafka常用命令
# 查看所有topic
./kafka-topics.sh --list --zookeeper localhost:2181
#查看topic的详细信息
./kafka-topics.sh -zookeeper 127.0.0.1:2181 -describe -topic testKJ1
----------------------------------------------------------------------------------------------------------------------------
# 接收消息consume
./kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test --from-beginning
# 发送消息produce
./kafka-console-producer.sh --broker-list localhost:9092 --topic test
注:出现 Broker may not be available.时,把localhost 换成 配置的ip地址