Skip to content
Kafka Is Fun

BeginnerOperations

What is consumer lag?

Reference answer

Consumer lag shows how far a consumer group is behind the end of a partition: the partition's log end offset (LOG-END-OFFSET in the kafka-consumer-groups.sh output) minus the group's current committed offset (CURRENT-OFFSET), measured in records, not time. A lag of 0 means the group has consumed everything available. A steadily growing lag means the consumer is reading more slowly than records arrive, which can point to a processing bottleneck. The end offset a consumer sees is the high watermark (or the last stable offset for read_committed), so records that are not yet replicated are not counted. An application can also read its own lag with currentLag() on the consumer.

Expected key concepts: lag, LOG-END-OFFSET, CURRENT-OFFSET, committed offset, records, consumed everything available, growing, bottleneck, high watermark, currentLag

How did that feel?

Your own verdict, not the score. It shows up next to this question in the list, so you can come back to the shaky ones.