启动kafka
nohup ./kafka-server-start.sh ../config/server.properties &
kafka常用的命令
创建topic
./kafka-topics.sh --zookeeper mini1:2181,mini2:2181,mini3:2181 --topic TestTopic1 --replication-factor 3 --partitions 3 --create
生产者生产消息
./kafka-console-producer.sh --broker-list mini1:9092,mini2:9092,mini3:9092 --topic TestTopic1
消费者消费消息
./kafka-console-consumer.sh --zookeeper mini1:2181,mini2:2181,mini3:2181 --topic TestTopic1 --from-beginning
查看所有主题
./kafka-topics.sh --zookeeper mini1:2181,mini2:2181,mini3:2181 --list
删除topic的命令是:
./kafka-topics.sh ?--delete --zookeeper mini1:2181,mini2:2181,mini3:2181 ?--topic
界面化管理链接:
源码 下载:https://github.com/Landoop/kafka-topics-ui
官网下载:http://www.landoop.com/blog/2016/08/kafka-topics-ui/