Kafka Consumer Properties - 容器 属性 ACKMODE 和 enable.auto.commit 之间有什么关系吗?
Kafka Consumer Properties - Is there any relationship between the container property ACKMODE and enable.auto.commit?
如果我们将消费者容器 属性 'AckMode' 设置为 RECORD,enable.auto.commit 为 true 并保留 auto.commit.interval.ms 默认值 5000 毫秒,消费者是否提交了获取基于非 ACKMODE 设置的记录后的偏移量,还是会在 5000 毫秒后提交偏移量?
有关此事请参阅Reference Manual:
Several options are provided for committing offsets. If the enable.auto.commit consumer property is true, Kafka auto-commits the offsets according to its configuration. If it is false, the containers support several AckMode settings (described in the next list)
因此,如果 enable.auto.commit
设置为 true
,则 AckMode
没有任何效果:一切都由 Apache Kafka 客户端本身完成。
如果我们将消费者容器 属性 'AckMode' 设置为 RECORD,enable.auto.commit 为 true 并保留 auto.commit.interval.ms 默认值 5000 毫秒,消费者是否提交了获取基于非 ACKMODE 设置的记录后的偏移量,还是会在 5000 毫秒后提交偏移量?
有关此事请参阅Reference Manual:
Several options are provided for committing offsets. If the enable.auto.commit consumer property is true, Kafka auto-commits the offsets according to its configuration. If it is false, the containers support several AckMode settings (described in the next list)
因此,如果 enable.auto.commit
设置为 true
,则 AckMode
没有任何效果:一切都由 Apache Kafka 客户端本身完成。