I am building a kafka manager tool
and I need to check which topic-partition is assigned to which consumer in a consumer group.
Suppose there is consumer-Group group-A
consuming topic topic-A
with n partitions
, so there can be multiple consumers in group-A
hosted in different VM's
. So how to find which partitioned is assigned to which consumer host? Is it possible in kafka 0.9.1
?
Thanks in advance.
You can check how $KAFKA_HOME/bin/kafka-consumer-groups.sh
works and integrate its implementation into your kafka manager tool
, this tool will show you detailed group owner information(for example, partition assignment, lag, IP).
GROUP TOPIC PARTITION CURRENT-OFFSET LOG-END-OFFSET LAG OWNER
page_visits_10k 0 500 3333 2833 consumer-1_/10.139.176.190
page_visits_10k 1 0 3334 3334 consumer-1_/10.139.176.190
page_visits_10k 2 0 3333 3333 consumer-1_/10.139.176.190
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With