Pulsar topic auto deletion not work
Search before asking
- [X] I searched in the issues and found nothing similar.
Read release policy
- [X] I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.
Version
Version 2.0
Minimal reproduce step
1.Edit pulsar broker.conf, add the following items:
brokerDeleteInactiveTopicsEnabled: true
brokerDeleteInactiveTopicsMode: delete_when_no_subscriptions
brokerDeleteInactiveTopicsMaxInactiveDurationSeconds: 600
-
Restart Pulsar broker
-
Add a topic with no subscriptions
-
After 600s, we can still query the topic by using admin API
What did you expect to see?
The topic can be deleted
What did you see instead?
The topic still exists
Anything else?
No response
Are you willing to submit a PR?
- [X] I'm willing to submit a PR!
Please report in English. @river1017 would you be able to translate the issue report? thanks
Please report in English. @river1017 would you be able to translate the issue report? thanks
@lhotari I translated it
it seems not an issue, try set brokerDeleteInactivePartitionedTopicMetadataEnabled to true
it seems not an issue, try set
brokerDeleteInactivePartitionedTopicMetadataEnabledto true
Thanks for the answer, but I set brokerDeleteInactivePartitionedTopicMetadataEnabled and then restarted pulsar but it doesn't seem to work.Ten minutes after restarting, I could still get the topic without subscribers from the interface.
There's a limitation in the deleting inactive topics when it comes to completely unused topics. If the namespace bundle of the topic isn't active, the topics won't get deleted.