windows环境下,kafka常用命令
创建topics
kafka-topics.bat --create --zookeeper localhost:2181 --replication-factor 1 --partition 3 --topic testsong
列出所有的topic列表
kafka-topics.bat -list -zookeeper localhost:2181
查看topic的描述
kafka-topics.bat --describe --zookeeper localhost:2181 --topic testsong
创建生产端
kafka-console-producer.bat --broker-list localhost:9092 --topic testsong
创建消费端
kafka-console-consumer.bat --zookeeper localhost:2181 --from-beginning --topic testsong