I read that the default experation time of kafka offsets are 7 days. Is my understanding correct for the following scenario?
Nothings happens for 6 days
Nothings happens for 2 days
Offset expiration Additional Upgrade Notes
According to the new semantics, offsets of partitions in a group will not be removed while the group is subscribed to the corresponding topic and is still active (has active consumers). If group becomes empty all its offsets will be removed after default offset retention period (or the one set by broker) has passed (unless the group becomes active again)
The consumer group offset will be removed when there are no active consumers in that group for 7 days of period (default retention).
When consumer crashes, that means there are no active consumers in that group and if the consumer is crashed for 7 days then offset will be removed.
Once the offset data is deleted/not found, then if any consumer subscribes will take the configs provided. If the auto-offset-reset=latest
then it will just consume the data published after the consumer is initialized.
auto.offset.reset docs
What to do when there is no initial offset in Kafka or if the current offset does not exist any more on the server (e.g. because that data has been deleted):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With