auto.offset.reset解释

来源:互联网 发布:mac六国 解决方法 编辑:程序博客网 时间:2024/06/15 08:53
auto.offset.resetlargestWhat 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

0 0
原创粉丝点击