Skip to content
Kafka Is Fun

Lesson 4 of 5

Consumer Lag & Monitoring

1 min read

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

Consumer fetch settings (defaults)properties
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 returned

Production 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

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.

Try it in the simulator

Guided scenarios for this module — the simulator opens with the exercise already running.

Prefer a picture? Open the live cluster in 3D and watch records move between producer, brokers and consumers.

Browse all troubleshooting entries