Skip to content
Kafka Is FunProgress

ScenarioProduction Scenarios

A consumer group suddenly shows 100,000 messages of consumer lag. How do you respond?

Reference answer

Triage: 1) Check if the consumer is running (kafka-consumer-groups.sh --describe). 2) Check consumer logs for errors or exceptions. 3) Check consumer CPU/memory/GC. 4) Check if it's a processing bottleneck (profiling) or a connectivity issue. 5) Check recent deployments — new slow code path? Remediation: 1) Scale consumers (if partitions available). 2) Fix the processing bottleneck. 3) If lag is catching up on its own — just monitor. 4) If lag is catastrophic and you need to skip old messages: reset offsets to now with --to-latest (accept data loss). 5) Implement parallel processing within consumer. Check: is the lag growing or shrinking? Growing = still behind. Stable = consuming at same rate as producing.

Expected key concepts: kafka-consumer-groups.sh, consumer running, consumer logs, exceptions, CPU, GC, processing bottleneck, scale consumers, reset offsets, to-latest, growing lag, shrinking lag