Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is delete.topic.enable in kafka

Tags:

I am new to Kafka, I have created some topic called Hell0-Kafka3

Now I want to delete it. So I am issuing a command like this:

$ bin/kafka-topics.sh --zookeeper localhost:2181 --delete --topic Hello-Kafka3
Topic Hello-Kafka3 is marked for deletion.
Note: This will have no impact if delete.topic.enable is not set to true.

Can someone help me to understand Note: on the last line ??

like image 469
Avinash Avatar asked Feb 20 '17 05:02

Avinash


People also ask

Can you delete a topic in Kafka?

In the last few versions of Apache's Kafka, deleting a topic is fairly easy. You just need to set one property in the configuration to 'true', and just issue a command to delete a topic. It'll be deleted in no time.

How long does it take Kafka to delete a topic?

Kafka Delete Topic – Every message Apache Kafka receives stores it in log and by default, it keeps the messages for 168 hrs which is 7 days. To delete the topic or all its messages can be done in several ways and the rest of the article explains these.


1 Answers

You have to set delete.topic.enable to true in config/server.properties before issuing this delete-topic command, otherwise, Kafka ignores the command you submit and does nothing for the topic.

like image 71
amethystic Avatar answered Sep 28 '22 05:09

amethystic