Consumer lag keeps growing
Checked against Kafka 4.2 · Oct 2026Community draft, not yet reviewed by a Kafka specialist
What it means
Lag is the distance between a partition's log end offset and the group's committed offset: the LAG column of kafka-consumer-groups.sh --describe shows LOG-END-OFFSET, CURRENT-OFFSET and LAG for each partition. Growing lag means records arrive faster than the group finishes them. It is a symptom, not an error message, so the first question is whether every partition is behind or only some.
Quick answer
Describe the group. Lag on every partition means the group is too slow overall: speed up processing or add consumers, up to the number of partitions. Lag on one partition points to a stuck consumer, a record that keeps failing, or a key with far more traffic than the others.
Likely causes, most common first
Processing is slower than the arrival rate
How to confirm
Every partition's LAG climbs and every partition has an active consumer. Measure the time per record in your handler: a downstream call or database write per record is a common cost.
confirm kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group paymentsFix
Batch the downstream work, or add consumers. KIP-932 describes how in a consumer group the number of consumers is tied to the number of partitions, so adding consumers beyond the partition count does not add throughput.
Too few partitions for the parallelism you need
How to confirm
Some consumers in the describe output own no partition, while the busy ones carry the lag.
Fix
Add partitions to the topic. The operations documentation warns that adding partitions does not change the partitioning of existing data, and that if data is partitioned by hash(key) % number_of_partitions this partitioning will potentially be shuffled. The kafka-topics.sh help carries the same warning.
One partition is far behind the rest
How to confirm
LAG is high on one or two partitions and near zero on the others. Check the consumer logs for the same failure repeating on one record, or for a key that carries disproportionate traffic.
Fix
For a record that keeps failing, stop retrying it forever: set it aside (for example in a dead letter topic) after a limited number of attempts. For a hot key, choose a different key or spread it, where your ordering needs allow.
The group keeps rebalancing, so it makes little progress
How to confirm
The group state keeps changing and members keep joining and leaving. The state command shows the current state.
Fix
See the rebalance entry.
See it happen
Trigger a consumer rebalance
Opens the simulator with this exercise already running. About 5 minutes.
Sources
Every claim above comes from these Apache pages, as of Kafka 4.2. If a page does not say it, this entry does not.
Was this helpful?
Report an issue (opens GitHub in a new tab)