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

windows中kafka使用方法

2.启动kafka
bin\windows\kafka-server-start.bat config\server.properties

windows中kafka使用方法
3.创建topic
bin\windows\kafka-topics.bat --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test

windows中kafka使用方法

4.查看topic
bin\windows\kafka-topics.bat --list --zookeeper localhost:2181

windows中kafka使用方法

5.启动producer
bin\windows\kafka-console-producer.bat --broker-list localhost:9092 --topic demo

windows中kafka使用方法
6.启动customer
bin\windows\kafka-console-consumer.bat --zookeeper localhost:2181 --topic demo --from-beginning

windows中kafka使用方法

转载于:https://my.oschina.net/871120/blog/3036582

相关文章:

  • 2021-12-07
  • 2022-12-23
  • 2021-09-24
  • 2021-08-21
  • 2022-01-05
  • 2021-12-09
  • 2021-04-14
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2021-11-04
相关资源
相似解决方案