本文介绍了如何查看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消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-28 02:53
查看更多