Not able to delete Topics from kafka

Viewed 10362

even after enabling delete.topic.enable=true in server.config deletion of topics not working . i am getting following error on recreating the topic again

Topic 'test' already exists.
[2017-05-23 06:47:05,757] ERROR 
org.apache.kafka.common.errors.TopicExistsException: Topic 'test' already exists.
4 Answers

You can not delete a topic when consuming it. Use bin/kafka-consumer-groups.sh or simple ps -aux|grep Consumer to find any possible consumers which block the operation.

remove meta data in zookeeper

./bin/zookeeper-shell.sh localhost:2181
rmr /brokers/topics/mytopic
rmr /admin/delete_topics/mytopic
Related