Which command lists all consumer groups?

Study for the CCDAK Apache Kafka Test. Prepare with optimized flashcards and diverse questions, enhanced with hints and detailed explanations. Equip yourself for success!

Multiple Choice

Which command lists all consumer groups?

Explanation:
Listing all consumer groups is done by querying the cluster through the broker and asking the tool to return just the group IDs. Use the kafka-consumer-groups.sh script with the broker connection flag and the list option. Point it at a running broker (the common port is 9092) and request a simple list. This returns all current consumer group IDs registered in the cluster. Connecting to the Zookeeper port (2181) or using the Zookeeper option is not correct for this operation because modern tooling communicates with the broker API, not Zookeeper. If you used describe, you’d get detailed information about each group (members, state, offsets) rather than a simple list. The Zookeeper-based approach is deprecated in newer Kafka versions. So the best command is the one that uses --bootstrap-server with a broker address and --list.

Listing all consumer groups is done by querying the cluster through the broker and asking the tool to return just the group IDs. Use the kafka-consumer-groups.sh script with the broker connection flag and the list option. Point it at a running broker (the common port is 9092) and request a simple list. This returns all current consumer group IDs registered in the cluster.

Connecting to the Zookeeper port (2181) or using the Zookeeper option is not correct for this operation because modern tooling communicates with the broker API, not Zookeeper. If you used describe, you’d get detailed information about each group (members, state, offsets) rather than a simple list. The Zookeeper-based approach is deprecated in newer Kafka versions. So the best command is the one that uses --bootstrap-server with a broker address and --list.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy