I have issued the command to delete a topic:
./bin/kafka-topics.sh --zookeeper localhost:2181 --delete --topic vip_ips_alerts
It seemed to
Check status of topic at zookeeper
bin\windows>kafka-topics.bat --list --zookeeper localhost:2181
Output: topic shows marked for deletion
Setting delete.topic.enable=true in server.properties was not working as well.
Solution:
Check the zookeeper data directory location in zookeeper.properties file.
it was dataDir=/tmp/zookeeper.
Issue got resolved after updating "dataDir" to a new location.
dataDir=zk-temp
# the port at which the clients will connect
clientPort=2181
# disable the per-ip limit on the number of connections since this is a non-production config
maxClientCnxns=0
In my case where i am using Kafka 8.2.2, I had to delete entries from the following manually -
Login to zookeeper and -
hbase zkcli
rmr /brokers/topics/{topic_name}
rmr /admin/delete_topics/{topic_name}
In Kafka, once the topic is marked for deletion, it will get finally removed after 60000 milliseconds.
Check the property log.segment.delete.delay.ms.
The documentation says:
file.delete.delay.ms: The time to wait before deleting a file from the filesystem Default value is 60000 ms.
The deletion happened for me almost immediately (v 0.9). I believe that it should be the same for you.
Once marked, the deletion will be triggered on the kafka node which is the topic partition leader. The thing to remember is that the the topic partition leader must be configured correctly (in terms of listeners), otherwise it will not receive the instruction to delete the logs.
I had my "marked for deletion" topics stuck at that state until I corrected my server properties and restarted the respective node.
The correct answer is actually the following. HOT off the Kafka-user's group email distribution list:
François Langelier *@gmail.com über kafka.apache.org 05:57 (vor 1 Stunde)
an users The delete topic isn't working ATM
I think it will be available in the next release https://issues.apache.org/jira/browse/KAFKA-1397