以下均為開發測試環境下:
啟動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