卡夫卡消费者补偿最大值? [英] Kafka consumer offset max value?

查看:84
本文介绍了卡夫卡消费者补偿最大值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在谷歌搜索和阅读Kafka文档,但无法找到使用者偏移量的最大值以及最大值之后是否存在偏移量回绕. 我知道offset是一个Int64值,因此最大值是0xFFFFFFFFFFFFFFFFFF. 如果有解决方法,Kafka如何处理这种情况?

I was googling and reading Kafka documentation but I couldn't find out the max value of a consumer offset and whether there is offset wraparound after max value. I understand offset is an Int64 value so max value is 0xFFFFFFFFFFFFFFFF. If there is wraparound, how does Kafka handle this situation?

推荐答案

根据此

According to this post, the offset is not reset:

此刻我们不回退偏移量.由于偏移量很长,所以它 可以持续很长时间.如果每天写入1TB,就可以继续 持续约400万天.

We don't roll back offset at this moment. Since the offset is a long, it can last for a really long time. If you write 1TB a day, you can keep going for about 4 million days.

此外,您始终可以使用更多分区(每个分区都有自己的分区) 偏移).

Plus, you can always use more partitions (each partition has its own offset).

正如卢西亚诺所说,也许不值得担心.

So as Luciano said, probably not worth worrying about.

这篇关于卡夫卡消费者补偿最大值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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