Overview
Consumer lag is how far a group is behind the end of a partition. kafka-consumer-groups.sh --describe shows CURRENT-OFFSET, LOG-END-OFFSET and LAG for each partition, where LAG is LOG-END-OFFSET minus CURRENT-OFFSET. Zero lag means the consumer is caught up, and growing lag means it is falling behind the production rate. The consumer also publishes JMX metrics such as records-lag-max (kafka.consumer:type=consumer-fetch-manager-metrics), and for read_committed consumers lag is measured relative to the last stable offset.
Key configuration
fetch.min.bytes=1 — minimum data the broker waits for before responding
fetch.max.wait.ms=500 — how long the broker waits if fetch.min.bytes is not met
max.partition.fetch.bytes=1048576 — per-partition fetch size; if the first batch is larger it is still returnedProduction tip
Check yourself
A partition's log end offset is 1,000 and the group's committed offset is 940. What is the lag?
Sources
- Basic Kafka operations (4.2 documentation) (opens in a new tab)
- Monitoring (4.2 documentation) (opens in a new tab)
- Consumer configs (4.2 documentation) (opens in a new tab)
- KafkaConsumer Javadoc (4.2) (opens in a new tab)
Checked against Kafka 4.2 documentation on Oct 2026. Draft: not yet reviewed by a Kafka specialist. Releases move on, so confirm against the current documentation before you act on a number.