Kafka: Consumer lag is the number that matters in production

Lag is the distance between the log end offset and the group's committed offset - growing lag means you are falling behind.

Code
kafka-consumer-groups.sh --bootstrap-server localhost:9092 \
  --describe --group orders-service
Output
TOPIC   PARTITION  CURRENT-OFFSET  LOG-END-OFFSET  LAG
orders  0          182034          182040          6
orders  1          97112           241880          144768   <- this one is stuck
Advertisement

Run this yourself in the Online Java Compiler, spin up a live REST API in the API Sandbox, or practise with Java interview questions.

Published 2026-08-11