以下均为开发测试环境下:
启动Zookeeper
bin/zookeeper-server-start.sh config/zookeeper.properties &
启动kafka
bin/kafka-server-start.sh config/server.properties
创建topic
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic rokid
查看kafka的topic中的内容
bin/kafka-topics.sh --describe --zookeeper localhost:2181 --topic rokid