Kafka consumer offset max value?

冷暖自知 提交于 2019-12-03 11:55:08

问题


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?


回答1:


According to this post, the offset is not reset:

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.




回答2:


It seems that this is not really "handled". But, taking into account that the offset is per partition, it seems this is something we should not worry about :)

Please see http://search-hadoop.com/m/uyzND1uRn8D1sSH322/rollover/v=threaded



来源:https://stackoverflow.com/questions/34408970/kafka-consumer-offset-max-value

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!