1.启动zookeeper
bin\windows\zookeeper-server-start.bat config\zookeeper.propertieswindows
2.启动kafka
bin\windows\kafka-server-start.bat config\server.properties3d
3.建立topic
bin\windows\kafka-topics.bat --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic testserver
4.查看topic
bin\windows\kafka-topics.bat --list --zookeeper localhost:2181blog
5.启动producer
bin\windows\kafka-console-producer.bat --broker-list localhost:9092 --topic demokafka
6.启动customer
bin\windows\kafka-console-consumer.bat --zookeeper localhost:2181 --topic demo --from-beginningit