When I configure 'delete.enable.topic=true' in kafka configuration file server.properties, but after I enable Ranger Kafka Plugin, I try to delete kafka topic and the topic can not be deleted completed.
Why? Can anyone help me solve the question?
When you delete a topic, it is marked for deletion and it eventually gets deleted. In the screenshot that you provided, it is working as design. The 'Note' that you see in the delete command output is a general reminder to set delete.enable.topic=true. If it is already set to true you can ignore that 'Note'
From the screenshot it looks like deletion is working fine because after deleting, I do not see that topic when you list topics, only when you are creating the topic again shows it in the list.
May I know how are you verifying that topic is not getting deleted?
Hello, attachment is the operations in my environment.
After I delete a topic named 'test-kafka-topic' I try to create a topic named 'test-kafka-topic', but it is created failed. And of course I set 'delete.topic.enable=true'.
So the deletion might not go through in the following scenarios:
1. broker hosting one of the replicas for that topic goes down
2. partition reassignment for partitions of that topic is in progress
3. preferred replica election for partitions of that topic is in progress
Kindly check if your brokers are up and running fine. Also you can check state-change logs to monitor the state of the topic after you ran delete command.
If you can share the state change logs here as well that would be helpful.
Also the last option would be to delete it manually but I would suggest to check the cause first.