Skip to content

Commit

Permalink
Topic Manager: Remove Remote Router Subscription will not stop announ…
Browse files Browse the repository at this point in the history
…cing topics to that router
  • Loading branch information
iitsoftware committed May 27, 2022
1 parent d205467 commit d4f4b4a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,8 @@ protected void startup(Configuration config)
ctx.remoteSubscriberList.setEntityRemoveListener(new EntityRemoveListener() {
public void onEntityRemove(Entity parent, Entity delEntity) throws EntityRemoveException {
removeRemoteSubscriptions(delEntity.getName());
if (ctx.announceSender != null)
ctx.announceSender.routerRemoved(delEntity.getName());
}
});
new TopicAnnounceSender(ctx);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ public void destinationAdded(Route route) {
}
}

public void routerRemoved(String routername) {
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace(ctx.topicManager.getName(), toString() + "/topicCreated: " + routername);
pipelineQueue.enqueue(new PODestinationRemoved(routername));
}

public void topicCreated(String topicName) {
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace(ctx.topicManager.getName(), toString() + "/topicCreated: " + topicName);
Expand Down Expand Up @@ -237,7 +243,7 @@ public void visit(PODestinationAdded po) {

public void visit(PODestinationRemoved po) {
if (ctx.traceSpace.enabled) ctx.traceSpace.trace(ctx.topicManager.getName(), toString() + "/" + po);
RemoteTopicManager rtm = (RemoteTopicManager) rtmList.get(po.getDestination());
RemoteTopicManager rtm = (RemoteTopicManager) rtmList.remove(po.getDestination());
if (rtm != null) {
rtm.close();
}
Expand Down

0 comments on commit d4f4b4a

Please sign in to comment.