安裝軟件
JDK
zookeeper
kafka
測試kafka
打開zookeeper
zkserver
打開kafka
cd?D:\bigdata\home\kafka_2.12-2.4.0
.\bin\windows\kafka-server-start.bat?.\config\server.properties
新建主題
cd? D:\bigdata\home\kafka_2.12-2.4.0\bin\windows
kafka-topics.bat --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic testdp

創(chuàng)建生產(chǎn)者
kafka-console-producer.bat --broker-list localhost:9092 --topic testdp

創(chuàng)建消費(fèi)者
cd? D:\bigdata\home\kafka_2.12-2.4.0\bin\windows
kafka-console-consumer.bat --bootstrap-server localhost:9092 --topic testdp --from-beginning
