auto.offset.reset largest
What to do when there is no initial offset in ZooKeeper or if an offset is out of range:
* smallest : automatically reset the offset to the smallest offset
* largest : automatically reset the offset to the largest offset
* anything else: throw exception to the consumer
当不同group中,如果consumer第一次启动时候,在zookeeper中没有初始的offset(读取的offset,不是logfile 的offset),或者offset过大,那么设置
smallest和largest才有效,如果smallest重新0开始读取,如果是largest从logfile的offset读取。一般情况下我们都是设置smallest
Kafka Offset 初始化策略
本文介绍了Kafka消费者在首次启动时遇到无初始Offset或Offset超出范围的情况如何处理。通过设置smallest或largest来自动调整Offset,确保消息的正确消费。
379

被折叠的 条评论
为什么被折叠?



