Monitoring Consumer Lag and Setting Alerts
Learn what consumer lag means, how to measure it, and how to build actionable alerts so you catch falling-behind consumers before users do.
What Is Consumer Lag
Consumer lag is the difference between the latest offset produced to a partition (the log-end offset) and the offset a consumer group has committed.
High lag means consumers are falling behind producers.
Why Lag Is the Key Metric
Lag is the single most actionable health signal for streaming systems. Growing lag predicts delayed processing, stale data, and eventually full disks if retention is exceeded.
All lessons in this course
- Kafka Metrics (JMX) and Health Checks
- Integrating with Prometheus & Grafana
- Distributed Tracing with Sleuth/Zipkin
- Monitoring Consumer Lag and Setting Alerts