We are facing a problem with Kafka. We have a topic with only a partition and only one consumer in a consumer group. The consumer has been stopped for a month. In the meantime, producers are sending messages to the topic.
When we start the consumer again, it is not able to consume messages. I assume that the previously committed offset has been lost, so the consumer has no idea to find the starting point when awaken.
When we stop and start the consumer again, then the consumer can pick up the new messages, but all message that has been sent previously never got consumed.
Has offset been corrupted? Does the retention period for the kafka internal topic offsets, mean that the last committed offsets been has removed?
The retention value can be configured in kafka broker using:
offsets.retention.minutes
The default is 24 hours. See: Kafka consumer group offset retention
Edit: As of Kafka 2.0, the default value is 7 days.