Skip to content
Kafka Is FunProgress

Lesson 4 of 5

Consumer Lag & Monitoring

Consumer lag = (partition LEO) - (consumer committed offset). Zero lag means the consumer is caught up. Growing lag means the consumer is falling behind production rate. Monitor with kafka-consumer-groups.sh --describe or via JMX. Lag is the most important consumer health metric in production.

Key configuration

broker / client configurationproperties
fetch.min.bytes=1 — min data broker waits before responding
fetch.max.wait.ms=500 — max time broker waits if fetch.min.bytes not met
max.partition.fetch.bytes=1048576 — max bytes per partition per fetch

Try it in the simulator

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