如何查看kafka消息 [英] How to view kafka message

查看:33
本文介绍了如何查看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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆