Cleanup getNamespacePolicies when update TopicPolicies
@@ -3029,7 +3029,6 @@ public class PersistentTopic extends AbstractTopic implements Topic, AddEntryCal
}
updateTopicPolicy(policies);
- Optional<Policies> namespacePolicies = getNamespacePolicies();
initializeTopicDispatchRateLimiterIfNeeded(policies);
dispatchRateLimiter.ifPresent(DispatchRateLimiter::updateDispatchRate);
@@ -3071,10 +3070,6 @@ public class PersistentTopic extends AbstractTopic implements Topic, AddEntryCal
});
}
- private Optional<Policies> getNamespacePolicies() {
- return DispatchRateLimiter.getPolicies(brokerService, topic);
- }
-
private void initializeTopicDispatchRateLimiterIfNeeded(TopicPolicies policies) {
synchronized (dispatchRateLimiter) {
if (!dispatchRateLimiter.isPresent() && policies.getDispatchRate() != null) {
