Standardize toplogy event handling strategy.

This commit is contained in:
Jon Chambers 2021-01-10 14:53:59 -05:00 committed by Jon Chambers
parent 22f7bb822f
commit cac86d1f77
2 changed files with 2 additions and 8 deletions

View File

@ -107,10 +107,7 @@ public class ClientPresenceManager extends RedisClusterPubSubAdapter<String, Str
connection.addListener(this);
connection.getResources().eventBus().get()
.filter(event -> event instanceof ClusterTopologyChangedEvent)
.handle((event, sink) -> {
resubscribeAll();
sink.next(event);
});
.subscribe(event -> resubscribeAll());
final String presenceChannel = getManagerPresenceChannel(managerId);
final int slot = SlotHash.getSlot(presenceChannel);

View File

@ -115,10 +115,7 @@ public class MessagesCache extends RedisClusterPubSubAdapter<String, String> imp
connection.addListener(this);
connection.getResources().eventBus().get()
.filter(event -> event instanceof ClusterTopologyChangedEvent)
.handle((event, sink) -> {
resubscribeAll();
sink.next(event);
});
.subscribe(event -> resubscribeAll());
});
}