massakam opened a new pull request #5340: [pulsar-broker] If cursor is not durable, close dispatcher when all consumers are removed from subscription URL: https://github.com/apache/pulsar/pull/5340 ### Motivation If cursor is not durable, the subscription is closed and removed from the topic when all consumers are removed. https://github.com/apache/pulsar/blob/413ba03050036a620fa346456ef6c3ff6071e9ab/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java#L237-L254 As mentioned in #5288, the dispatcher also needs to be closed at this time. Otherwise, `RateLimiter` instances will not be garbage collected, causing a memory leak.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
