public KafkaTransportContext(ISendPipe sendPipe, IHostConfiguration hostConfiguration, KafkaTopicAddress topicAddress)
     : base(hostConfiguration)
 {
     SendPipe     = sendPipe;
     HostAddress  = hostConfiguration.HostAddress;
     TopicAddress = topicAddress;
 }
 public InMemorySendEndpointProvider(Uri sourceAddress, ISendTransportProvider transportProvider, IMessageSerializer defaultSerializer, ISendPipe sendPipe)
 {
     _transportProvider = transportProvider;
     _defaultSerializer = defaultSerializer;
     _sendPipe          = sendPipe;
     _sourceAddress     = sourceAddress;
     _sendObservable    = new SendObservable();
 }
 public InMemorySendEndpointProvider(Uri sourceAddress, ISendTransportProvider transportProvider, IMessageSerializer defaultSerializer, ISendPipe sendPipe)
 {
     _transportProvider = transportProvider;
     _defaultSerializer = defaultSerializer;
     _sendPipe = sendPipe;
     _sourceAddress = sourceAddress;
     _sendObservable = new SendObservable();
 }
 public ServiceBusSendEndpointProvider(IMessageSerializer serializer, Uri sourceAddress, ISendTransportProvider transportProvider, ISendPipe sendPipe)
 {
     _transportProvider = transportProvider;
     _sendPipe          = sendPipe;
     _sourceAddress     = sourceAddress;
     _serializer        = serializer;
     _sendObservable    = new SendObservable();
 }
 public RabbitMqSendEndpointProvider(IMessageSerializer serializer, Uri inputAddress, ISendTransportProvider transportProvider, ISendPipe sendPipe)
 {
     _inputAddress      = inputAddress;
     _transportProvider = transportProvider;
     _sendPipe          = sendPipe;
     _serializer        = serializer;
     _sendObservable    = new SendObservable();
 }
 public ServiceBusSendEndpointProvider(IMessageSerializer serializer, Uri sourceAddress, ISendTransportProvider transportProvider, ISendPipe sendPipe)
 {
     _transportProvider = transportProvider;
     _sendPipe = sendPipe;
     _sourceAddress = sourceAddress;
     _serializer = serializer;
     _sendObservable = new SendObservable();
 }
Ejemplo n.º 7
0
 public SendEndpoint(ISendTransport transport, IMessageSerializer serializer, Uri destinationAddress, Uri sourceAddress, ISendPipe sendPipe)
 {
     _transport         = transport;
     _sendPipe          = sendPipe;
     Serializer         = serializer;
     DestinationAddress = destinationAddress;
     SourceAddress      = sourceAddress;
 }
 public RabbitMqSendEndpointProvider(IMessageSerializer serializer, Uri inputAddress, ISendTransportProvider transportProvider, ISendPipe sendPipe)
 {
     _inputAddress = inputAddress;
     _transportProvider = transportProvider;
     _sendPipe = sendPipe;
     _serializer = serializer;
     _sendObservable = new SendObservable();
 }
Ejemplo n.º 9
0
        public HttpReceiveTransport(IHttpHost host, ReceiveSettings receiveSettings, ISendPipe sendPipe)
        {
            _host            = host;
            _receiveSettings = receiveSettings;
            _sendPipe        = sendPipe;

            _receiveObservable          = new ReceiveObservable();
            _receiveTransportObservable = new ReceiveTransportObservable();
        }
Ejemplo n.º 10
0
        public HttpReceiveTransport(IHttpHost host, ReceiveSettings receiveSettings, ISendPipe sendPipe)
        {
            _host = host;
            _receiveSettings = receiveSettings;
            _sendPipe = sendPipe;

            _receiveObservable = new ReceiveObservable();
            _receiveTransportObservable = new ReceiveTransportObservable();
        }
Ejemplo n.º 11
0
 public EventHubProducerProvider(IEventHubHostConfiguration hostConfiguration, IBusInstance busInstance, ISendPipe sendPipe,
                                 SendObservable sendObservable, IMessageSerializer messageSerializer)
 {
     _hostConfiguration = hostConfiguration;
     _busInstance       = busInstance;
     _sendPipe          = sendPipe;
     _sendObservable    = sendObservable;
     _messageSerializer = messageSerializer;
 }
Ejemplo n.º 12
0
 public KafkaTransportContext(ISendPipe sendPipe, IHostConfiguration hostConfiguration, KafkaTopicAddress topicAddress,
                              IProducerContextSupervisor <TKey, TValue> supervisor)
     : base(hostConfiguration)
 {
     _hostConfiguration = hostConfiguration;
     _supervisor        = supervisor;
     SendPipe           = sendPipe;
     TopicAddress       = topicAddress;
 }
 public EventHubProducerContext(EventHubProducerClient producerClient, IEventHubProducerSharedContext context)
 {
     _producerClient = producerClient;
     HostAddress     = context.HostAddress;
     LogContext      = context.LogContext;
     SendObservers   = context.SendObservers;
     Serializer      = context.Serializer;
     _pipe           = context.SendPipe;
 }
 public KafkaProducerContext(IProducer <TKey, TValue> producer, IHostConfiguration hostConfiguration, ISendPipeConfiguration sendConfiguration,
                             SendObservable sendObservers, IHeadersSerializer headersSerializer)
 {
     _producer          = producer;
     _hostConfiguration = hostConfiguration;
     _sendPipe          = sendConfiguration.CreatePipe();
     SendObservers      = sendObservers;
     HeadersSerializer  = headersSerializer;
 }
Ejemplo n.º 15
0
        public SendEndpointProvider(ISendTransportProvider transportProvider, SendObservable observers, IMessageSerializer serializer, Uri sourceAddress, ISendPipe sendPipe)
        {
            _transportProvider = transportProvider;
            _serializer        = serializer;
            _sourceAddress     = sourceAddress;
            _sendPipe          = sendPipe;

            _cache     = new SendEndpointCache <Uri>();
            _observers = observers;
        }
        public HttpResponseReceiveEndpointContext(ReceiveEndpointContext receiveEndpointContext, HttpContext httpContext, ISendPipe sendPipe,
                                                  IMessageSerializer serializer)
        {
            _receiveEndpointContext = receiveEndpointContext;
            _httpContext            = httpContext;
            _sendPipe   = sendPipe;
            _serializer = serializer;

            _sendEndpointProvider = new Lazy <ISendEndpointProvider>(CreateSendEndpointProvider);
        }
        public HttpResponseReceiveEndpointTopology(IReceiveEndpointTopology topology, IOwinContext owinContext, ISendPipe sendPipe,
                                                   IMessageSerializer serializer)
        {
            _topology    = topology;
            _owinContext = owinContext;
            _sendPipe    = sendPipe;
            _serializer  = serializer;

            _sendEndpointProvider = new Lazy <ISendEndpointProvider>(CreateSendEndpointProvider);
        }
Ejemplo n.º 18
0
        public HttpReceiveTransport(IHttpHost host, ReceiveSettings receiveSettings, IPublishEndpointProvider publishEndpointProvider, ISendPipe sendPipe)
        {
            _host                    = host;
            _receiveSettings         = receiveSettings;
            _publishEndpointProvider = publishEndpointProvider;
            _sendPipe                = sendPipe;

            _receiveObservable          = new ReceiveObservable();
            _receiveTransportObservable = new ReceiveTransportObservable();
        }
Ejemplo n.º 19
0
        public SendEndpointProvider(ISendTransportProvider provider, SendObservable observers, IMessageSerializer serializer, Uri sourceAddress,
                                    ISendPipe sendPipe)
        {
            _provider      = provider;
            _serializer    = serializer;
            _sourceAddress = sourceAddress;
            _sendPipe      = sendPipe;

            _cache     = SendEndpointCacheFactory.Create <Uri>();
            _observers = observers;
        }
Ejemplo n.º 20
0
        public HttpPublishEndpointProvider(IHttpHost host, IMessageSerializer serializer, ISendTransportProvider transportProvider, IPublishPipe publishPipe,
                                           ISendPipe sendPipe)
        {
            _host              = host;
            _serializer        = serializer;
            _transportProvider = transportProvider;
            _publishPipe       = publishPipe;
            _sendPipe          = sendPipe;

            _publishObservable = new PublishObservable();
        }
        public HttpResponseSendEndpointProvider(HttpContext httpContext, Uri inputAddress, ISendPipe sendPipe, IMessageSerializer serializer,
                                                ISendEndpointProvider sendEndpointProvider)
        {
            _serializer   = serializer;
            _httpContext  = httpContext;
            _inputAddress = inputAddress;
            _sendPipe     = sendPipe;

            _observers            = new SendObservable();
            _sendEndpointProvider = sendEndpointProvider;
        }
        public HttpPublishEndpointProvider(IHttpHost host, IMessageSerializer serializer, ISendTransportProvider transportProvider, IPublishPipe publishPipe,
            ISendPipe sendPipe)
        {
            _host = host;
            _serializer = serializer;
            _transportProvider = transportProvider;
            _publishPipe = publishPipe;
            _sendPipe = sendPipe;

            _publishObservable = new PublishObservable();
        }
Ejemplo n.º 23
0
 public EventHubTransportContext(IEventHubHostConfiguration hostConfiguration, ISendPipe sendPipe,
                                 IHostConfiguration configuration, Uri endpointAddress, IMessageSerializer messageSerializer)
     : base(configuration)
 {
     _configuration             = configuration;
     SendPipe                   = sendPipe;
     EndpointAddress            = new EventHubEndpointAddress(HostAddress, endpointAddress);
     _producerContextSupervisor =
         new Recycle <IProducerContextSupervisor>(() =>
                                                  new ProducerContextSupervisor(hostConfiguration.ConnectionContextSupervisor, EndpointAddress.EventHubName, messageSerializer));
 }
Ejemplo n.º 24
0
        public SendEndpoint(ISendTransport transport, IMessageSerializer serializer, Uri destinationAddress, Uri sourceAddress, ISendPipe sendPipe,
                            ConnectHandle observerHandle = null)
        {
            _transport      = transport;
            _sendPipe       = sendPipe;
            _observerHandle = observerHandle;

            Serializer         = serializer;
            DestinationAddress = destinationAddress;
            SourceAddress      = sourceAddress;
        }
 public EventHubProducerSharedContext(IBusInstance busInstance, SendObservable sendObservers, ISendPipe sendPipe,
                                      ISerializationConfiguration serializationConfiguration, IHostSettings hostSettings, EventHubProducerClientOptions options)
 {
     SendObservers = sendObservers;
     SendPipe      = sendPipe;
     _busInstance  = busInstance;
     _serializationConfiguration = serializationConfiguration;
     _hostSettings = hostSettings;
     _options      = options;
     _clients      = new ConcurrentDictionary <string, EventHubProducerClient>();
 }
        public HttpResponseSendEndpointProvider(ReceiveSettings receiveSettings,
            IOwinContext owinContext,
            Uri inputAddress,
            ISendPipe sendPipe)
        {
            _receiveSettings = receiveSettings;
            _owinContext = owinContext;
            _inputAddress = inputAddress;
            _sendPipe = sendPipe;

            _observers = new SendObservable();
        }
        public HttpResponseSendEndpointProvider(ReceiveSettings receiveSettings,
                                                IOwinContext owinContext,
                                                Uri inputAddress,
                                                ISendPipe sendPipe)
        {
            _receiveSettings = receiveSettings;
            _owinContext     = owinContext;
            _inputAddress    = inputAddress;
            _sendPipe        = sendPipe;

            _observers = new SendObservable();
        }
        public ProducerContextSupervisor(string topicName,
                                         ISendPipe sendPipe, SendObservable sendObservers, IClientContextSupervisor clientContextSupervisor,
                                         IHostConfiguration hostConfiguration, IHeadersSerializer headersSerializer,
                                         Func <ProducerBuilder <TKey, TValue> > producerBuilderFactory)
            : base(new ProducerContextFactory <TKey, TValue>(clientContextSupervisor, headersSerializer, producerBuilderFactory))
        {
            _sendObservers     = sendObservers;
            _hostConfiguration = hostConfiguration;
            _topicAddress      = new KafkaTopicAddress(hostConfiguration.HostAddress, topicName);
            _sendPipe          = sendPipe;

            clientContextSupervisor.AddSendAgent(this);
        }
        /// <summary>
        /// Adds a RabbitMQ Basic Consumer to the pipeline
        /// </summary>
        /// <param name="configurator"></param>
        /// <param name="receivePipe"></param>
        /// <param name="settings"></param>
        /// <param name="receiveSettings"></param>
        /// <param name="receiveObserver"></param>
        /// <param name="receiveTransportObserver"></param>
        /// <param name="supervisor"></param>
        /// <param name="sendPipe"></param>
        public static void HttpConsumer(this IPipeConfigurator<OwinHostContext> configurator, IPipe<ReceiveContext> receivePipe, HttpHostSettings settings,
            ReceiveSettings receiveSettings,
            IReceiveObserver receiveObserver, IReceiveTransportObserver receiveTransportObserver, ITaskSupervisor supervisor,
            ISendPipe sendPipe)
        {
            if (configurator == null)
                throw new ArgumentNullException(nameof(configurator));

            var pipeBuilderConfigurator = new HttpConsumerPipeSpecification(settings, receiveSettings, receivePipe, receiveObserver, receiveTransportObserver,
                supervisor, sendPipe);

            configurator.AddPipeSpecification(pipeBuilderConfigurator);
        }
Ejemplo n.º 30
0
        MediatorSendEndpoint(IReceiveEndpointConfiguration configuration, IReceivePipeDispatcher dispatcher, ILogContext logContext,
                             SendObservable sendObservers)
        {
            _dispatcher    = dispatcher;
            _logContext    = logContext;
            _sendObservers = sendObservers;

            _destinationAddress = configuration.InputAddress;
            _publishTopology    = configuration.Topology.Publish;
            _receiveObservers   = configuration.ReceiveObservers;

            _sendPipe            = configuration.Send.CreatePipe();
            _publishSendEndpoint = new MediatorPublishSendEndpoint(this, configuration.Publish.CreatePipe());
        }
Ejemplo n.º 31
0
        public PublishEndpointProvider(IPublishTransportProvider transportProvider, Uri hostAddress, PublishObservable publishObservers,
                                       IMessageSerializer serializer, Uri sourceAddress, IPublishPipe publishPipe, IPublishTopology publishTopology)
        {
            _transportProvider = transportProvider;
            _hostAddress       = hostAddress;
            _serializer        = serializer;
            _sourceAddress     = sourceAddress;
            _publishTopology   = publishTopology;
            _publishObservers  = publishObservers;

            _sendPipe = new PipeAdapter(publishPipe);

            _cache = SendEndpointCacheFactory.Create <Type>();
        }
        public InMemoryReceiveEndpointTopology(IInMemoryEndpointConfiguration configuration, Uri inputAddress, IMessageSerializer serializer,
                                               ISendTransportProvider sendTransportProvider)
        {
            InputAddress           = inputAddress;
            _configuration         = configuration;
            _serializer            = serializer;
            _sendTransportProvider = sendTransportProvider;

            _sendPipe    = configuration.Send.CreatePipe();
            _publishPipe = configuration.Publish.CreatePipe();

            _sendEndpointProvider    = new Lazy <ISendEndpointProvider>(CreateSendEndpointProvider);
            _publishEndpointProvider = new Lazy <IPublishEndpointProvider>(CreatePublishEndpointProvider);
        }
        /// <summary>
        /// Adds a RabbitMQ Basic Consumer to the pipeline
        /// </summary>
        /// <param name="configurator"></param>
        /// <param name="receivePipe"></param>
        /// <param name="settings"></param>
        /// <param name="receiveSettings"></param>
        /// <param name="receiveObserver"></param>
        /// <param name="receiveTransportObserver"></param>
        /// <param name="supervisor"></param>
        /// <param name="sendPipe"></param>
        public static void HttpConsumer(this IPipeConfigurator <OwinHostContext> configurator, IPipe <ReceiveContext> receivePipe, HttpHostSettings settings,
                                        ReceiveSettings receiveSettings,
                                        IReceiveObserver receiveObserver, IReceiveTransportObserver receiveTransportObserver, ITaskSupervisor supervisor,
                                        ISendPipe sendPipe)
        {
            if (configurator == null)
            {
                throw new ArgumentNullException(nameof(configurator));
            }

            var pipeBuilderConfigurator = new HttpConsumerPipeSpecification(settings, receiveSettings, receivePipe, receiveObserver, receiveTransportObserver,
                                                                            supervisor, sendPipe);

            configurator.AddPipeSpecification(pipeBuilderConfigurator);
        }
Ejemplo n.º 34
0
 public HttpConsumerFilter(IPipe <ReceiveContext> receivePipe,
                           IReceiveObserver receiveObserver,
                           IReceiveTransportObserver transportObserver,
                           ITaskSupervisor supervisor,
                           HttpHostSettings hostSettings,
                           ReceiveSettings receiveSettings,
                           ISendPipe sendPipe)
 {
     _receivePipe       = receivePipe;
     _receiveObserver   = receiveObserver;
     _transportObserver = transportObserver;
     _supervisor        = supervisor;
     _hostSettings      = hostSettings;
     _receiveSettings   = receiveSettings;
     _sendPipe          = sendPipe;
 }
        public ServiceBusReceiveEndpointTopology(IServiceBusEndpointConfiguration configuration, Uri inputAddress, IMessageSerializer serializer,
                                                 IServiceBusHost host, ISendTransportProvider sendTransportProvider, BrokerTopology brokerTopology)
        {
            InputAddress           = inputAddress;
            _serializer            = serializer;
            _host                  = host;
            BrokerTopology         = brokerTopology;
            _sendTransportProvider = sendTransportProvider;

            _send    = configuration.Topology.Send;
            _publish = configuration.Topology.Publish;

            _sendPipe    = configuration.Send.CreatePipe();
            _publishPipe = configuration.Publish.CreatePipe();

            _sendEndpointProvider    = new Lazy <ISendEndpointProvider>(CreateSendEndpointProvider);
            _publishEndpointProvider = new Lazy <IPublishEndpointProvider>(CreatePublishEndpointProvider);
        }
Ejemplo n.º 36
0
        public HttpConsumerAction(IReceiveObserver receiveObserver,
            HttpHostSettings settings,
            ReceiveSettings receiveSettings,
            IPipe<ReceiveContext> receivePipe,
            ITaskScope taskSupervisor,
            ISendPipe sendPipe)
        {
            _receiveObserver = receiveObserver;
            _receiveSettings = receiveSettings;
            _receivePipe = receivePipe;
            _sendPipe = sendPipe;

            _tracker = new DeliveryTracker(OnDeliveryComplete);
            _inputAddress = settings.GetInputAddress();
            _participant = taskSupervisor.CreateParticipant($"{TypeMetadataCache<HttpConsumerAction>.ShortName} - {_inputAddress}", Stop);
            _deliveryComplete = new TaskCompletionSource<bool>();

            _participant.SetReady();
        }
        public HttpReceiveEndpointTopology(IHttpEndpointConfiguration configuration, Uri inputAddress, IMessageSerializer serializer, IHttpHost host,
                                           BusHostCollection <HttpHost> hosts)
        {
            InputAddress = inputAddress;
            _serializer  = serializer;
            _host        = host;
            _hosts       = hosts;

            _send    = configuration.Topology.Send;
            _publish = configuration.Topology.Publish;

            _consumePipe = configuration.Consume.CreatePipe();
            _sendPipe    = configuration.Send.CreatePipe();
            _publishPipe = configuration.Publish.CreatePipe();

            _sendEndpointProvider    = new Lazy <ISendEndpointProvider>(CreateSendEndpointProvider);
            _publishEndpointProvider = new Lazy <IPublishEndpointProvider>(CreatePublishEndpointProvider);
            _sendTransportProvider   = new Lazy <ISendTransportProvider>(CreateSendTransportProvider);
        }
Ejemplo n.º 38
0
        public HttpConsumerAction(IReceiveObserver receiveObserver,
                                  HttpHostSettings settings,
                                  ReceiveSettings receiveSettings,
                                  IPipe <ReceiveContext> receivePipe,
                                  ITaskScope taskSupervisor,
                                  ISendPipe sendPipe)
        {
            _receiveObserver = receiveObserver;
            _receiveSettings = receiveSettings;
            _receivePipe     = receivePipe;
            _sendPipe        = sendPipe;

            _tracker          = new DeliveryTracker(OnDeliveryComplete);
            _inputAddress     = settings.GetInputAddress();
            _participant      = taskSupervisor.CreateParticipant($"{TypeMetadataCache<HttpConsumerAction>.ShortName} - {_inputAddress}", Stop);
            _deliveryComplete = new TaskCompletionSource <bool>();

            _participant.SetReady();
        }