public MessagingMiddleware(IRabbitMqClient rabbitMqClient, RouteMatcher routeMatcher,
     ICorrelationContextBuilder correlationContextBuilder, CorrelationIdFactory correlationIdFactory,
     IOptions<MessagingOptions> messagingOptions)
 {
     _rabbitMqClient = rabbitMqClient;
     _routeMatcher = routeMatcher;
     _correlationContextBuilder = correlationContextBuilder;
     _correlationIdFactory = correlationIdFactory;
     _endpoints = messagingOptions.Value.Endpoints?.Any() is true
         ? messagingOptions.Value.Endpoints.GroupBy(e => e.Method.ToUpperInvariant())
             .ToDictionary(e => e.Key, e => e.ToList())
         : new Dictionary<string, List<MessagingOptions.EndpointOptions>>();
 }
Beispiel #2
0
 public LogContextMiddleware(CorrelationIdFactory correlationIdFactory)
 {
     _correlationIdFactory = correlationIdFactory;
 }
Beispiel #3
0
 public CustomHttpMessageInvoker(CorrelationIdFactory correlationIdFactory, HttpMessageHandler handler,
                                 bool disposeHandler) : base(handler, disposeHandler)
 {
     _correlationIdFactory = correlationIdFactory;
 }
Beispiel #4
0
 public CustomProxyHttpClientFactory(CorrelationIdFactory correlationIdFactory)
 {
     _correlationIdFactory = correlationIdFactory;
 }