如何查看kafka消息 [英] How to view kafka message
本文介绍了如何查看kafka消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么办法可以查看给定主题发送给kafka的消息内容?如果可能的话,例如查看该主题的最后5条消息.
Is there any way I can view the message content sent to kafka for a given topic? Say some thing like view last 5 messages for this topic, if that it possible.
推荐答案
您可以使用控制台使用者查看在某些主题上生成的消息:
You can use console consumer to view messages produced on some topic:
bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test --from-beginning
这篇关于如何查看kafka消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文