kafka-console-consumer.bat --bootstrap-server localhost:2181 --topic baeldung
kafka-console-producer.bat --broker-list localhost:9092 --topic baeldung
消息不会从生产者发送到消费者。
最佳答案
在消费者中你错误地使用了 zookeeper 端口 2181。它必须是 localhost:9092
关于windows - 无法将消息从生产者发送到消费者,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53866240/