Below
command is used to delete a topic.
kafka-topics.sh
--bootstrap-server {bootStratServerDetails} --topic {topicName} --delete
Example
kafka-topics.sh
--bootstrap-server localhost:9092 --topic mySecondTopic --delete
$kafka-topics.sh --bootstrap-server localhost:9092 --list
myFirstTopic
mySecondTopic
$
$kafka-topics.sh --bootstrap-server localhost:9092 --topic mySecondTopic --delete
$
$kafka-topics.sh --bootstrap-server localhost:9092 --list
myFirstTopic
No comments:
Post a Comment