Search in sources :

Example 1 with UpstreamClusterChangedEventConsumer

use of com.alibaba.rsocket.upstream.UpstreamClusterChangedEventConsumer in project alibaba-rsocket-broker by alibaba.

the class RSocketBrokerClient method initUpstreamManager.

private void initUpstreamManager() {
    this.upstreamManager = new UpstreamManagerImpl(rsocketRequesterSupport);
    upstreamManager.add(new UpstreamCluster(null, "*", null, this.brokers));
    try {
        upstreamManager.init();
        this.cloudEventsProcessor.addConsumer(new UpstreamClusterChangedEventConsumer(upstreamManager));
    } catch (Exception e) {
        e.printStackTrace();
    }
}
Also used : UpstreamManagerImpl(com.alibaba.rsocket.upstream.UpstreamManagerImpl) UpstreamCluster(com.alibaba.rsocket.upstream.UpstreamCluster) UpstreamClusterChangedEventConsumer(com.alibaba.rsocket.upstream.UpstreamClusterChangedEventConsumer)

Aggregations

UpstreamCluster (com.alibaba.rsocket.upstream.UpstreamCluster)1 UpstreamClusterChangedEventConsumer (com.alibaba.rsocket.upstream.UpstreamClusterChangedEventConsumer)1 UpstreamManagerImpl (com.alibaba.rsocket.upstream.UpstreamManagerImpl)1