kafka

1、启动zookpeer    

  zkserver

2、启动kafka

   kafka-server-start.bat   d:\kafka_2.11-2.1\config\server.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

posted @ 2019-03-20 16:11  咸蛋超人、  阅读(91)  评论(0编辑  收藏  举报