Monitor Kafka Consumer Lag

Kajal Rawal
2 min readMar 1, 2023

The basic way to monitor Kafka Consumer Lag is to use the Kafka command line tools and see the lag in the console. We can use the kafka-consumer-groups.sh script provided with Kafka and run a lag command similar to this one:

$ bin/kafka-consumer-groups.sh - bootstrap-server localhost:8080 - describe - group console-consumer-12342

The result would be the lag for the provided consumer group. Here is a very simple example that uses the console consumer:

GROUP                 TOPIC           PARTITION  CURRENT-OFFSET  LOG-END-OFFSET…

--

--

Kajal Rawal

Programming isn’t about what you know; it’s about what you can figure out.