Kafka消费者偏移最大值? [英] Kafka consumer offset max value?

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

问题描述

我在谷歌上搜索并阅读 Kafka 文档,但我找不到消费者偏移量的最大值以及最大值后是否有偏移量环绕.我知道偏移量是一个 Int64 值,所以最大值是 0xFFFFFFFFFFFFFFFF.如果有环绕,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?

推荐答案

根据这个 post,偏移量未重置:

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.

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

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