Search in sources :

Example 1 with LocalReactiveServiceCaller

use of com.alibaba.rsocket.rpc.LocalReactiveServiceCaller in project alibaba-rsocket-broker by alibaba.

the class RSocketAutoConfiguration method rsocketResponderHandlerFactoryWithZipkin.

@Bean
@ConditionalOnMissingBean
@ConditionalOnBean(type = "brave.Tracing")
public RSocketResponderHandlerFactory rsocketResponderHandlerFactoryWithZipkin(@Autowired LocalReactiveServiceCaller serviceCaller, @Autowired @Qualifier("reactiveCloudEventProcessor") TopicProcessor<CloudEventImpl> eventProcessor) {
    return (setupPayload, requester) -> Mono.fromCallable(() -> {
        RSocketResponderHandler responderHandler = new RSocketResponderHandler(serviceCaller, eventProcessor, requester, setupPayload);
        Tracing tracing = applicationContext.getBean(Tracing.class);
        responderHandler.setTracer(tracing.tracer());
        return responderHandler;
    });
}
Also used : RSocketServiceHealth(com.alibaba.rsocket.health.RSocketServiceHealth) RSocketAppContext(com.alibaba.rsocket.RSocketAppContext) RSocketRequesterSupport(com.alibaba.rsocket.RSocketRequesterSupport) TopicProcessor(reactor.extra.processor.TopicProcessor) JwtTokenNotFoundException(com.alibaba.spring.boot.rsocket.upstream.JwtTokenNotFoundException) Autowired(org.springframework.beans.factory.annotation.Autowired) RSocketServicesPublishHook(com.alibaba.spring.boot.rsocket.responder.RSocketServicesPublishHook) RSocketServiceAnnotationProcessor(com.alibaba.spring.boot.rsocket.responder.invocation.RSocketServiceAnnotationProcessor) Value(org.springframework.beans.factory.annotation.Value) RSocketResponderHandler(com.alibaba.rsocket.rpc.RSocketResponderHandler) ObjectProvider(org.springframework.beans.factory.ObjectProvider) CloudEventImpl(com.alibaba.rsocket.cloudevents.CloudEventImpl) EnableConfigurationProperties(org.springframework.boot.context.properties.EnableConfigurationProperties) Qualifier(org.springframework.beans.factory.annotation.Qualifier) WebServerInitializedEvent(org.springframework.boot.web.context.WebServerInitializedEvent) MetricsService(com.alibaba.rsocket.observability.MetricsService) RSocketRequesterSupportCustomizer(com.alibaba.spring.boot.rsocket.upstream.RSocketRequesterSupportCustomizer) Tracing(brave.Tracing) org.springframework.boot.autoconfigure.condition(org.springframework.boot.autoconfigure.condition) UpstreamCluster(com.alibaba.rsocket.upstream.UpstreamCluster) Mono(reactor.core.publisher.Mono) RSocketResponderHandlerFactory(com.alibaba.rsocket.listen.RSocketResponderHandlerFactory) SmartLifecycleUpstreamManagerImpl(com.alibaba.spring.boot.rsocket.upstream.SmartLifecycleUpstreamManagerImpl) ApplicationListener(org.springframework.context.ApplicationListener) CloudEventsProcessor(com.alibaba.rsocket.events.CloudEventsProcessor) SocketAcceptor(io.rsocket.SocketAcceptor) ServiceInstancesChangedEventConsumer(com.alibaba.rsocket.upstream.ServiceInstancesChangedEventConsumer) ApplicationContext(org.springframework.context.ApplicationContext) Collectors(java.util.stream.Collectors) MetricsServicePrometheusImpl(com.alibaba.spring.boot.rsocket.observability.MetricsServicePrometheusImpl) RoutingEndpoint(com.alibaba.rsocket.route.RoutingEndpoint) Configuration(org.springframework.context.annotation.Configuration) RSocketServiceHealthImpl(com.alibaba.spring.boot.rsocket.health.RSocketServiceHealthImpl) CloudEventsConsumer(com.alibaba.rsocket.events.CloudEventsConsumer) UpstreamClusterChangedEventConsumer(com.alibaba.rsocket.upstream.UpstreamClusterChangedEventConsumer) Environment(org.springframework.core.env.Environment) PrometheusMeterRegistry(io.micrometer.prometheus.PrometheusMeterRegistry) UpstreamManager(com.alibaba.rsocket.upstream.UpstreamManager) Bean(org.springframework.context.annotation.Bean) LocalReactiveServiceCaller(com.alibaba.rsocket.rpc.LocalReactiveServiceCaller) RSocketRequesterSupportBuilderImpl(com.alibaba.spring.boot.rsocket.upstream.RSocketRequesterSupportBuilderImpl) RSocketResponderHandler(com.alibaba.rsocket.rpc.RSocketResponderHandler) Tracing(brave.Tracing) Bean(org.springframework.context.annotation.Bean)

Aggregations

Tracing (brave.Tracing)1 RSocketAppContext (com.alibaba.rsocket.RSocketAppContext)1 RSocketRequesterSupport (com.alibaba.rsocket.RSocketRequesterSupport)1 CloudEventImpl (com.alibaba.rsocket.cloudevents.CloudEventImpl)1 CloudEventsConsumer (com.alibaba.rsocket.events.CloudEventsConsumer)1 CloudEventsProcessor (com.alibaba.rsocket.events.CloudEventsProcessor)1 RSocketServiceHealth (com.alibaba.rsocket.health.RSocketServiceHealth)1 RSocketResponderHandlerFactory (com.alibaba.rsocket.listen.RSocketResponderHandlerFactory)1 MetricsService (com.alibaba.rsocket.observability.MetricsService)1 RoutingEndpoint (com.alibaba.rsocket.route.RoutingEndpoint)1 LocalReactiveServiceCaller (com.alibaba.rsocket.rpc.LocalReactiveServiceCaller)1 RSocketResponderHandler (com.alibaba.rsocket.rpc.RSocketResponderHandler)1 ServiceInstancesChangedEventConsumer (com.alibaba.rsocket.upstream.ServiceInstancesChangedEventConsumer)1 UpstreamCluster (com.alibaba.rsocket.upstream.UpstreamCluster)1 UpstreamClusterChangedEventConsumer (com.alibaba.rsocket.upstream.UpstreamClusterChangedEventConsumer)1 UpstreamManager (com.alibaba.rsocket.upstream.UpstreamManager)1 RSocketServiceHealthImpl (com.alibaba.spring.boot.rsocket.health.RSocketServiceHealthImpl)1 MetricsServicePrometheusImpl (com.alibaba.spring.boot.rsocket.observability.MetricsServicePrometheusImpl)1 RSocketServicesPublishHook (com.alibaba.spring.boot.rsocket.responder.RSocketServicesPublishHook)1 RSocketServiceAnnotationProcessor (com.alibaba.spring.boot.rsocket.responder.invocation.RSocketServiceAnnotationProcessor)1