1、启动zookpeer
zkserver
2、启动kafka
kafka-server-start.bat d:kafka_2.11-2.1configserver.properties
3、创建topic为test
kafka-topics.bat --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test
4、开启produce
kafka-console-producer.bat --broker-list localhost:9092 --topic test
5、开启customer
kafka-console-consumer.bat --bootstrap-server localhost:9092 --topic test --from-beginning