kafka windows启动

╰+哭是因爲堅強的太久メ 2023-06-07 03:19 90阅读 0赞

1.开启自带的zookeeper

  1. bin\windows\zookeeper-server-start.bat config\zookeeper.properties

2.启动kafka服务端

  1. bin\windows\kafka-server-start.bat config\server.properties

3.查看有哪些topic

  1. bin\windows\kafka-topics.bat --list --bootstrap-server localhost:9092

4.创建topic = test

  1. bin\windows\kafka-topics.bat --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic test

5.启动生产者

  1. bin\windows\kafka-console-producer.bat --broker-list localhost:9092 --topic test

6.启动监听者

  1. bin\windows\kafka-console-consumer.bat --bootstrap-server localhost:9092 --topic test--from-beginning

发表评论

表情:
评论列表 (有 0 条评论,90人围观)

还没有评论,来说两句吧...

相关阅读