Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

how to list number of consumers in kafka

how to list number of consumers in kafka

New Contributor
 
1 REPLY 1
Highlighted

Re: how to list number of consumers in kafka

Contributor

In order to list consumers, you can use:

/usr/hdp/current/kafka-broker/bin/kafka-consumer-groups.sh --zookeeper <zkHost>:<zkPort> --list

Note: This will only show information about consumers that use ZooKeeper (not those using the Java consumer API).

/usr/hdp/current/kafka-broker/bin/kafka-consumer-groups.sh --bootstrap-server <bokerHost:BrokerPort> --list

Note: This will only show information about consumers that use the Java consumer API (non-ZooKeeper-based consumers).

If you're using kerberos:

/usr/hdp/current/kafka-broker/bin/kafka-consumer-groups.sh --bootstrap-server <bokerHost:BrokerPort> --list --new-consumer --command-config /tmp/test.properties

cat/tmp/test.properties

security.protocol=PLAINTEXTSASL

If this answers your query/issue then please mark this HCC thread as answered by clicking on "Accept" link on the correct answer, That way it will help other HCC users to quickly find the answers.