kafka和zookeeper都用单机模式(standalone)布好
http://blog.csdn.net/weixin_37288522/article/details/70306325
创建topic
单机模式,一个broker,一个副本
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test
查看kafka中的topics
bin/kafka-topics.sh --zookeeper localhost:2181 --list
producer生产数据
bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test
consumer消费数据
bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning