新鲜出炉kafka4.0 windows 部署教程
kafka4.0 windows 部署
Kafka没有专门为Windows制作独立包,但是在windows下可以直接下载 kafka_2.13-4.0.0.tgz进行部署
- 下载:https://kafka.apache.org/downloads
- 生成UUID:
bin\windows\kafka-storage.bat random-uuid - 格式化:
bin\windows\kafka-storage.bat format --standalone -t rYfhz8FaQqGtKRSHhMFTmg -c config/server.properties - 启动:
bin\windows\kafka-server-start.bat config\server.properties - 创建topic:
bin\windows\kafka-topics.bat --create --topic test-topic --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 - 启动生产者:
bin\windows\kafka-console-producer.bat --topic test-topic --bootstrap-server localhost:9092 - 启动消费者:
bin\windows\kafka-console-consumer.bat --topic test-topic --from-beginning --bootstrap-server localhost:9092