Search in sources :

Example 6 with LoadBalancedRSocket

use of com.alibaba.rsocket.loadbalance.LoadBalancedRSocket in project alibaba-rsocket-broker by alibaba.

the class UpstreamCluster method init.

@Override
public void init() {
    if (status != 1) {
        if (!this.uris.isEmpty()) {
            freshUpstreams();
        }
        loadBalancedRSocket = new LoadBalancedRSocket(getServiceId(), urisProcessor, rsocketRequesterSupport);
        status = 1;
    }
}
Also used : LoadBalancedRSocket(com.alibaba.rsocket.loadbalance.LoadBalancedRSocket)

Example 7 with LoadBalancedRSocket

use of com.alibaba.rsocket.loadbalance.LoadBalancedRSocket in project alibaba-rsocket-broker by alibaba.

the class UpstreamBrokerCluster method init.

public void init() {
    if (status != 1) {
        // todo customized requester support
        loadBalancedRSocket = new LoadBalancedRSocket("*", urisProcessor, rsocketRequesterSupport);
        freshUpstreams();
        status = 1;
    }
}
Also used : LoadBalancedRSocket(com.alibaba.rsocket.loadbalance.LoadBalancedRSocket)

Aggregations

LoadBalancedRSocket (com.alibaba.rsocket.loadbalance.LoadBalancedRSocket)7 HessianDecoder (com.alibaba.spring.boot.rsocket.hessian.HessianDecoder)3 HessianEncoder (com.alibaba.spring.boot.rsocket.hessian.HessianEncoder)3 Bean (org.springframework.context.annotation.Bean)3 RSocketStrategies (org.springframework.messaging.rsocket.RSocketStrategies)3 UpstreamCluster (com.alibaba.rsocket.upstream.UpstreamCluster)2 RSocketAppContext (com.alibaba.rsocket.RSocketAppContext)1 RSocketRequesterSupport (com.alibaba.rsocket.RSocketRequesterSupport)1 ServiceLocator (com.alibaba.rsocket.ServiceLocator)1 CloudEventImpl (com.alibaba.rsocket.cloudevents.CloudEventImpl)1 RSocketCloudEventBuilder (com.alibaba.rsocket.cloudevents.RSocketCloudEventBuilder)1 AppStatusEvent (com.alibaba.rsocket.events.AppStatusEvent)1 PortsUpdateEvent (com.alibaba.rsocket.events.PortsUpdateEvent)1 ServicesExposedEvent (com.alibaba.rsocket.events.ServicesExposedEvent)1 RSocketServiceHealth (com.alibaba.rsocket.health.RSocketServiceHealth)1 RsocketErrorCode (com.alibaba.rsocket.observability.RsocketErrorCode)1 UpstreamManager (com.alibaba.rsocket.upstream.UpstreamManager)1 Collectors (java.util.stream.Collectors)1 NotNull (org.jetbrains.annotations.NotNull)1 Logger (org.slf4j.Logger)1