Kafka by default deletes fixed offsets after a custom period of time. See the offsets.retention.minutes parameter. That is, if the consumer group is inactive (that is, it does not record the bias) during this time, the bias is deleted. Thus, even if the consumer is working, if he does not have offset.retention.minutes offsets for some sections, these offsets are subject to offset.retention.minutes .
If you are starting a consumer, the following happens:
- search for (actual) fixed bias (for a group of consumers)
- if the correct offset is found, resume from there
- if no valid offset is found, reset the offset according to the
auto.offset.reset parameter
Thus, if your offsets were deleted and auto.offset.reset = latest , your consumer will not poll anything until new data is added to the topic. If auto.offset.reset = earliest it should auto.offset.reset = earliest whole topic.
See This JIRA for a discussion about this https://issues.apache.org/jira/browse/KAFKA-3806 and https://issues.apache.org/jira/browse/KAFKA-4682
Matthias J. Sax Aug 25 '16 at 9:53 on 2016-08-25 09:53
source share