[fix][broker] Unregister topic policy listener if managed ledger close failed
@@ -1323,6 +1323,7 @@ public class PersistentTopic extends AbstractTopic implements Topic, AddEntryCal
public void closeFailed(ManagedLedgerException exception, Object ctx) {
log.error("[{}] Failed to close managed ledger, proceeding anyway.", topic, exception);
brokerService.removeTopicFromCache(topic);
+ unregisterTopicPolicyListener();
closeFuture.complete(null);
}
}, null);
