kafka windows启动
1.开启自带的zookeeper
bin\windows\zookeeper-server-start.bat config\zookeeper.properties
2.启动kafka服务端
bin\windows\kafka-server-start.bat config\server.properties
3.查看有哪些topic
bin\windows\kafka-topics.bat --list --bootstrap-server localhost:9092
4.创建topic = test
bin\windows\kafka-topics.bat --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic test
5.启动生产者
bin\windows\kafka-console-producer.bat --broker-list localhost:9092 --topic test
6.启动监听者
bin\windows\kafka-console-consumer.bat --bootstrap-server localhost:9092 --topic test--from-beginning
还没有评论,来说两句吧...