简体   繁体   English

有没有办法在没有消费者的情况下从 Kafka 主题中读取消息?

[英]Is there any way to read messages from Kafka topic without consumer?

Just for testing purpose, I want to automate scenario where I need to check Kafka messages content, so just wanted to know if it is possible to read messages without consumers directly from TOPIC using Kafka java libraries?仅出于测试目的,我想自动化需要检查 Kafka 消息内容的场景,所以只是想知道是否可以使用 Kafka java 库直接从 TOPIC 读取没有消费者的消息?

I'm new to Kafka so any suggestion will be good for me.我是 Kafka 的新手,所以任何建议都会对我有好处。

Thanks in advance!提前致谢!

You could SSH to the broker in question, then dump the log segments into a deserialized fashion, but it would take less time to simply use a consumer in any language, not necessarily Java您可以将 SSH 发送到有问题的代理,然后将日志段转储为反序列化的方式,但只需使用任何语言的消费者都将花费更少的时间,不一定是 Java

"For testing purposes" Kafka Java API provides MockProducer and MockConsumer, which are backed by Lists, not a full broker “用于测试目的”Kafka Java API 提供 MockProducer 和 MockConsumer,它们由 Lists 支持,而不是完整的代理

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从 ZeroCode 框架使用 Kafka Topic - How to Consume Kafka Topic from ZeroCode Framework ActiveMQ Artemis无需在JMeter中使用即可读取消息 - ActiveMQ Artemis read messages without consuming it in JMeter 有没有一种方法可以显示有关Dr. Racket Exception的信息消息? - Is there a way to display info messages for any Dr. Racket Exception? 如何对kafka客户应用程序执行功能测试? - How to perform functional testing of a kafka consumer application? iOS开发:有一种无需使用仪器即可从命令提示符读取.trace文件的方法 - iOS Development: Is there a way to read .trace files from command prompt without using instruments 在C#中,有没有一种神奇的方法可以在不将代码粘贴到任何地方的情况下从+千个测试用例函数中检查+早返回? - In C#, is there any magic way to check+early-return from ~thousand test case functions without pasting that code everywhere? 无法使用 ZeroCode 在 Kafka 主题上发布 json 消息 - Cannot publish json message on Kafka topic using ZeroCode .NET无需自动化即可从标签读取文本 - .NET Read Text from Label without Automation 来自 JQuery 的进度条,有没有办法将它从 0 移动到 100 - Progress bar from JQuery, is there any way to move it from 0 to 100 有什么方法可以从Selenium ide连接数据库服务器? - Is there any way to connect the Database server from Selenium ide?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM