Which command lists all Kafka topics using Zookeeper?

Study for the CCDAK Apache Kafka Test. Use flashcards and multiple choice questions with hints and explanations for each question. Prepare thoroughly for your exam!

Multiple Choice

Which command lists all Kafka topics using Zookeeper?

Explanation:
Listing topics through the Kafka topics tool using Zookeeper relies on the older setup where Zookeeper holds the cluster metadata. To simply see all topics, you connect to Zookeeper (with the host and port, such as localhost:2181) and request a list. The command that does this uses the Zookeeper connection and the --list option, which asks Zookeeper for the names of all topics and returns them. Using a bootstrap-server instead connects directly to Kafka brokers and would list topics via the broker metadata, not through Zookeeper, so it doesn’t meet the requirement here. The --describe option would show detailed information about topics rather than a simple list, and --delete would remove topics rather than list them.

Listing topics through the Kafka topics tool using Zookeeper relies on the older setup where Zookeeper holds the cluster metadata. To simply see all topics, you connect to Zookeeper (with the host and port, such as localhost:2181) and request a list. The command that does this uses the Zookeeper connection and the --list option, which asks Zookeeper for the names of all topics and returns them.

Using a bootstrap-server instead connects directly to Kafka brokers and would list topics via the broker metadata, not through Zookeeper, so it doesn’t meet the requirement here. The --describe option would show detailed information about topics rather than a simple list, and --delete would remove topics rather than list them.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy