[英]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.