cd /d G:\\kafka\_2.11-0.10.0.1\\bin\\windows
kafka-console-consumer.bat --zookeeper localhost:2181 --topic test
然后就可以在Producer控制台窗口输入消息了。在消息输入过后,很快Consumer窗口就会显示出Producer发送的消息:
![Image](https://box.kancloud.cn/243fab45dd4ca6e684b153542f07a095_1010x423.png)
![Image](https://box.kancloud.cn/9614bd2fb7bfa6bdf75a98aa65803c4f_920x416.png)