kafka在windows环境下安装

时间:2022-12-13 11:27:15

1、打开zookeeper

zkServer

2、

cd E:\experiment\kafka\kafka_2.11-0.10.1.1

E:\experiment\kafka\kafka_2.11-0.10.1.1>
bin\windows\kafka-server-start.bat config\server.properties

3、
E:\experiment\kafka\kafka_2.11-0.10.1.1\bin\windows>kafka-topics.bat –create –
zookeeper localhost:2181 –replication-factor 1 –partitions 1 –topic bak.yy_zh
webevent_original

4、
cd E:\experiment\kafka\kafka_2.11-0.10.1.1\bin\windows>
kafka-console-producer.bat –broker-list localhost:9092 –topic bak.yy_zhwebevent_original

5、
cd E:\experiment\kafka\kafka_2.11-0.10.1.1\bin\windows

kafka-console-consumer.bat –zookeeper localhost:2181 –topic bak.yy_zhwebevent_original

6、查看

E:\experiment\kafka\kafka_2.11-0.10.1.1\bin\windows>kafka-topics –zookeeper node01:2181 –list