kafka Install
官网地址:
https://kafka.apache.org/
快速开始:
https://kafka.apache.org/quickstart
下载链接
https://www.apache.org/dyn/closer.cgi?path=/kafka/3.2.0/kafka_2.13-3.2.0.tgz
启动zookeeper
zookeeper-server-start.bat config\zookeeper.properties
启动kafka
kafka-server-start.bat config\server.properties
创建topic
kafka-topics.bat --create --topic topic-test --bootstrap-server localhost:9092
生产者往topic中发消息
kafka-console-producer.bat --topic topic-test --bootstrap-server localhost:9092
消费者接受消息
kafka-console-consumer.bat --topic topic-test --bootstrap-server localhost:9092