Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Kafka lag using Kafka 0.10?

Tags:

apache-kafka

As Kafka 0.10 isn't using Zookeeper anymore to store the lags anymore, how do I retrieve it now? Is there way to access it from the consumers?

like image 471
shakedzy Avatar asked May 23 '17 13:05

shakedzy


1 Answers

According to the latest documentation: kafka.apache.org/documentation it is done the following way:

> bin/kafka-consumer-groups.sh --bootstrap-server broker1:9092 --describe --group test-consumer-group

  TOPIC                          PARTITION  CURRENT-OFFSET  LOG-END-OFFSET  LAG        CONSUMER-ID                                       HOST                           CLIENT-ID
  test-foo                       0          1               3               2          consumer-1-a5d61779-4d04-4c50-a6d6-fb35d942642d   /127.0.0.1                     consumer-1
like image 197
streetturtle Avatar answered Oct 21 '22 03:10

streetturtle