Which command deletes a Kafka topic named 'my-first-topic'?

Study for the CCDAK Apache Kafka Test. Dive into comprehensive flashcards and multiple choice questions with detailed hints and explanations. Ensure your readiness for the exam with our targeted practice efforts!

Multiple Choice

Which command deletes a Kafka topic named 'my-first-topic'?

Explanation:
Deleting a topic in Kafka is done by using the topic-management script with the delete action, along with the topic name you want to remove. The crucial piece is the --delete flag paired with --topic my-first-topic, which tells Kafka to remove that topic’s metadata and data (assuming broker settings allow it). In the given commands, the one that actually performs deletion includes the delete flag and the topic name and connects to the cluster with --zookeeper, matching the typical usage in this context. The other commands either describe the topic, list topics, or attempt deletion using a different connection method that isn’t shown as the standard approach here. Keep in mind that topic deletion must be enabled on the broker (delete.topic.enable = true) for the delete to succeed.

Deleting a topic in Kafka is done by using the topic-management script with the delete action, along with the topic name you want to remove. The crucial piece is the --delete flag paired with --topic my-first-topic, which tells Kafka to remove that topic’s metadata and data (assuming broker settings allow it). In the given commands, the one that actually performs deletion includes the delete flag and the topic name and connects to the cluster with --zookeeper, matching the typical usage in this context. The other commands either describe the topic, list topics, or attempt deletion using a different connection method that isn’t shown as the standard approach here. Keep in mind that topic deletion must be enabled on the broker (delete.topic.enable = true) for the delete to succeed.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy