赞
踩
1.启动/关闭zookeeper
.\windows\zookeeper-server-start.bat ..\config\zookeeper.properties
.\windows\zookeeper-server-stop.bat ..\config\zookeeper.properties
2. 启动/关闭kafka
.\windows\kafka-server-start.bat ..\config\server.properties
.\windows\kafka-server-stop.bat ..\config\server.properties
3. 消费消息
.\windows\kafka-console-consumer.bat --bootstrap-server localhost:9092 --from-beginning --topic test
4.创建消息
.\windows\kafka-console-producer.bat --broker-list localhost:9092 --topic test
5.创建topic
.\windows\kafka-topics.bat --create -zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test
6.删除topic
.\windows\kafka-topics.bat — zookeeper localhost:2181 --delete --topic test
7.查询topic列表
.\windows\kafka-topics.bat --list --zookeeper localhost:2181
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。