BeginnerCore Concepts
What is the purpose of the __consumer_offsets topic?
Reference answer
__consumer_offsets is an internal Kafka topic that stores committed consumer group offsets. When a consumer calls commitSync()/commitAsync(), the committed offset is written as a message to this topic with the key = (group, topic, partition) and value = committed offset metadata. On consumer restart, the group coordinator reads this topic to determine where each consumer should resume. It's a replicated, compacted topic (retains only the latest offset per key), so offset history is preserved.
Expected key concepts: __consumer_offsets, internal, committed offsets, commitSync, commitAsync, group, topic, partition, replicated, compacted, group coordinator