偏移量存储为Kafka时如何检查消费者偏移量?

Abh*_*ram 5 apache-kafka

从0.8.1.1版本中,卡夫卡提供了计提卡夫卡偏移的存储,而不是动物园管理员(见)。我无法弄清楚如何检查所消耗补偿的细节,因为目前的工具只能提供给仅供饲养员消费者偏移计数检查。(我指的是这个

如果有任何工具可用来检查消费者的抵销,请告知我。

Kay*_*ayV 8

以下直接命令给出了足够的详细信息:

kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group my-second-application
Run Code Online (Sandbox Code Playgroud)

您将得到这样的详细信息

TOPIC           PARTITION  CURRENT-OFFSET  LOG-END-OFFSET  LAG             CONSUMER-ID                                     HOST            CLIENT-ID
first_topic     0          4               4               0               consumer-1-7cb31cf3-1621-4635-8f95-6ae85215b31b /10.200.237.53  consumer-1
first_topic     1          3               3               0               consumer-1-7cb31cf3-1621-4635-8f95-6ae85215b31b /10.200.237.53  consumer-1
first_topic     2          3               3               0               consumer-1-7cb31cf3-1621-4635-8f95-6ae85215b31b /10.200.237.53  consumer-1
first-topic     0          4               4               0               -                                               -               -
Run Code Online (Sandbox Code Playgroud)


cod*_*tsu 5

I'am using kafka 0.8.2 with offsets stored in kafka. This tools works good for me:

./kafka-run-class.sh kafka.tools.ConsumerOffsetChecker 
        --topic your-topic 
        --group your-consumer-group
        --zookeeper localhost:2181
Run Code Online (Sandbox Code Playgroud)

You get all informations you need: topic size, consumer lag, owner.