Spring KafkaListener如何去抖动
我有一个包含服务器注册的主题,但它可能会一次收到多条消息,因为服务器在集群中运行,但我只需要最后一条。所以我想我想要一个类似于 Debounce kafka events 的反跳,但我想为 < code>KafkaListener 由 Spring 提供。
数据已压缩
,但段缩小需要时间,并且数据仍然很快就会传入。
I have a topic that contains server registrations but it may get several messages at once because the servers run in a cluster, but I only need the last one. So I was thinking I wanted a debounce similar to Debounce kafka events but I want to implement it for the KafkaListener
provided by Spring.
The data is compacted
, but it takes time for the segment to shrink and data still comes in pretty quickly.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来更像日志压缩功能可以满足您的要求: https://kafka.apache.org/documentation/ #压缩
Sounds more like Log Compaction feature would fit your requirements: https://kafka.apache.org/documentation/#compaction