英文:
Kafka lag with read_uncommitted isolation level
问题
未提交的记录在 Kafka 滞后中计算吗,如果消费者配置为仅读取已提交的记录?
我阅读了文档,但在那里没有找到答案。
https://kafka.apache.org/documentation/#basic_ops_consumer_lag
英文:
Are uncommitted records counted in kafka lag if the consumer is configured to read only committed records?
I read the documentation but didn't find the answer there
https://kafka.apache.org/documentation/#basic_ops_consumer_lag
答案1
得分: 1
如果您在不提交的情况下轮询和处理事件,那么滞后时间将保持或增加,具体取决于新产生的事件。所以,是的,滞后时间包括未提交的记录。
如果您指的是“未完成的事务”,那么我记得曾经有一个 bug,它总是使滞后时间非零(至少为一个),因为它在计算事务标记,而这些标记会被消费者自动丢弃。
英文:
If you poll and process an event without committing, then the lag will remain or increase, depending on new produced events. So, yes, lag includes uncommitted records.
If you're referring to unfinished transactions, then I recall there was a bug that always made lag be non-zero (at least one), as it was counting transaction markers, which are discarded automatically by the consumer.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论