[英]How to reset the offset in REST proxy for reconsuming Kafka messages?
I consumed some messages from the Kafka queue, and now I want to consume them again (just fetch all data from the beginning). 我使用了Kafka队列中的一些消息,现在我想再次使用它们(只是从头开始获取所有数据)。 How can I reset the offset in Scala or using Kafka Rest Proxy ? 如何在Scala或使用Kafka Rest Proxy中重置偏移量? I am currently using "auto.offset.reset": "smallest"
: 我目前正在使用"auto.offset.reset": "smallest"
:
curl -X POST -H "Content-Type: application/vnd.kafka.v1+json" \
--data '{"format": "json", "auto.offset.reset": "smallest"}' \
XXX.XX.XXX.XXX:9092/consumers/test
Please notice that I am not interested in the solution 请注意,我对解决方案不感兴趣
The last param in the URL is group Id . URL中的最后一个参数是组ID 。 Kafka stores committed offset per group Id. Kafka商店按组ID承诺的偏移量。 So, changing group Id should be enough (.../consumers/newGroupId). 因此,更改组ID应该足够(... / consumers / newGroupId)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.