Replies: 1 comment 4 replies
-
Yes, it will retry offset commits, and if it fails to commit offsets it will trigger an optional offset_commit_cb() which propagates results of the automatic commits, and if that's not available a line will be logged, something like: The consumer will be (temporarily) evicted from the group on rebalance and if max.poll.interval.ms is triggered, or there's a connectivity issue with the group coordinator. The consumer will rejoin as soon as it can. A consumer will be able to commit its final offsets during a rebalance, but not when being kicked out of the group for the other reasons. When the consumer has rejoined the group it will read the last committed offsets for the partitions assigned to it. |
Beta Was this translation helpful? Give feedback.
-
From what I understand, when
enable.auto.commit
istrue
, then librdkafka will commit the latest offset of the messages which have been consumed by the application, and it'll reach out to the broker everyauto.commit.interval.ms
to do that.But what happens if it can't reach the broker? I assume it will keep retrying? Would there be any error messages in the logs at this point if it wasn't able to reach the broker?
And at what point will the consumer be disconnected from the group? I assume if the consumer can't commit the offset, then it is also likely not able to poll, so would it just keep retrying to commit until
max.poll.interval.ms
is reached and then the consumer is disconnected? Or could the commit failing cause the librdkafka consumer to consider itself connected on its own and "disconnect" and "rejoin" the group?And then when it reconnected it would then start from the last committed offset, so those messages which couldn't be commited could end up being duplicated, is that correct?
Beta Was this translation helpful? Give feedback.
All reactions