connection.subscribe(myTopic, listener);
myListenerToConnectionMap.put(listener, connection);
}
public void add(@NotNull final T listener, @NotNull Disposable parentDisposable) {
Disposer.register(parentDisposable, new Disposable() {
public void dispose() {
myListenerToConnectionMap.remove(listener);
}
});
final MessageBusConnection connection = myMessageBus.connect(parentDisposable);