public ActiveMqConsumerReceiveEndpointContext(IActiveMqHostConfiguration hostConfiguration, IActiveMqReceiveEndpointConfiguration configuration,
                                               BrokerTopology brokerTopology)
     : base(hostConfiguration, configuration)
 {
     _hostConfiguration = hostConfiguration;
     BrokerTopology     = brokerTopology;
 }
        public ServiceBusEntityReceiveEndpointContext(IServiceBusEntityEndpointConfiguration configuration, BrokerTopology brokerTopology)
            : base(configuration)
        {
            _configuration = configuration;

            BrokerTopology = brokerTopology;
        }
 public ConfigureTopologyFilter(TSettings settings, BrokerTopology brokerTopology, bool removeSubscriptions, CancellationToken cancellationToken)
 {
     _settings            = settings;
     _brokerTopology      = brokerTopology;
     _removeSubscriptions = removeSubscriptions;
     _cancellationToken   = cancellationToken;
 }
 public SqsQueueReceiveEndpointContext(IAmazonSqsHostConfiguration hostConfiguration, IAmazonSqsReceiveEndpointConfiguration configuration,
                                       BrokerTopology brokerTopology)
     : base(hostConfiguration, configuration)
 {
     _hostConfiguration = hostConfiguration;
     BrokerTopology     = brokerTopology;
 }
Beispiel #5
0
        public SqsQueueReceiveEndpointContext(IAmazonSqsReceiveEndpointConfiguration configuration, BrokerTopology brokerTopology)
            : base(configuration)
        {
            _configuration = configuration;
            BrokerTopology = brokerTopology;

            _publishTopology = configuration.Topology.Publish;
        }
Beispiel #6
0
        public ServiceBusEntityReceiveEndpointContext(IServiceBusHostControl host, IServiceBusEntityEndpointConfiguration configuration,
                                                      BrokerTopology brokerTopology)
            : base(configuration)
        {
            _host = host;

            BrokerTopology = brokerTopology;
        }
Beispiel #7
0
        public RabbitMqQueueReceiveEndpointContext(IRabbitMqHostControl host, IRabbitMqReceiveEndpointConfiguration configuration, BrokerTopology brokerTopology)
            : base(configuration)
        {
            _host = host;

            ExclusiveConsumer = configuration.Settings.ExclusiveConsumer;
            BrokerTopology    = brokerTopology;
        }
        public override void Probe(ProbeContext context)
        {
            context.Add("type", "RabbitMQ");
            context.Set(_settings);

            var topologyScope = context.CreateScope("topology");

            BrokerTopology.Probe(topologyScope);
        }
        public SqsQueueReceiveEndpointContext(IAmazonSqsHostConfiguration hostConfiguration, IAmazonSqsReceiveEndpointConfiguration configuration,
                                              BrokerTopology brokerTopology, ReceiveSettings settings)
            : base(hostConfiguration, configuration)
        {
            _hostConfiguration = hostConfiguration;
            _settings          = settings;
            BrokerTopology     = brokerTopology;

            _clientContext = new Recycle <IClientContextSupervisor>(() => hostConfiguration.ConnectionContextSupervisor.CreateClientContextSupervisor());
        }
        public SqsQueueReceiveEndpointContext(IAmazonSqsHostConfiguration hostConfiguration, IAmazonSqsReceiveEndpointConfiguration configuration,
                                              BrokerTopology brokerTopology)
            : base(hostConfiguration, configuration)
        {
            _hostConfiguration = hostConfiguration;
            _configuration     = configuration;
            BrokerTopology     = brokerTopology;

            _clientContext = new Recycle <IClientContextSupervisor>(() => new ClientContextSupervisor(_hostConfiguration.ConnectionContextSupervisor));
        }
        public override void Probe(ProbeContext context)
        {
            context.Add("type", "RabbitMQ");
            context.Add("concurrentMessageLimit", ConcurrentMessageLimit);
            context.Set(_configuration.Settings);

            var topologyScope = context.CreateScope("topology");

            BrokerTopology.Probe(topologyScope);
        }
        public ActiveMqConsumerReceiveEndpointContext(IActiveMqHostConfiguration hostConfiguration, IActiveMqReceiveEndpointConfiguration configuration,
                                                      BrokerTopology brokerTopology, ReceiveSettings settings)
            : base(hostConfiguration, configuration)
        {
            _hostConfiguration = hostConfiguration;
            _settings          = settings;
            BrokerTopology     = brokerTopology;

            _sessionContext = new Recycle <ISessionContextSupervisor>(() => new SessionContextSupervisor(hostConfiguration.ConnectionContextSupervisor));
        }
Beispiel #13
0
        public ServiceBusEntityReceiveEndpointContext(IServiceBusHostConfiguration hostConfiguration, IServiceBusEntityEndpointConfiguration configuration,
                                                      BrokerTopology brokerTopology)
            : base(hostConfiguration, configuration)
        {
            _hostConfiguration = hostConfiguration;

            BrokerTopology = brokerTopology;

            GetOrAddPayload(() => _hostConfiguration.HostTopology);
        }
        public RabbitMqQueueReceiveEndpointContext(IRabbitMqHostConfiguration hostConfiguration, IRabbitMqReceiveEndpointConfiguration configuration,
                                                   BrokerTopology brokerTopology)
            : base(hostConfiguration, configuration)
        {
            _hostConfiguration = hostConfiguration;

            ExclusiveConsumer = configuration.Settings.ExclusiveConsumer;
            BrokerTopology    = brokerTopology;

            ModelContextSupervisor = hostConfiguration.CreateModelContextSupervisor();
        }
        public RabbitMqQueueReceiveEndpointContext(IRabbitMqReceiveEndpointConfiguration configuration, BrokerTopology brokerTopology,
                                                   ReceiveObservable receiveObservers, ReceiveTransportObservable transportObservers, ReceiveEndpointObservable endpointObservers)
            : base(configuration, receiveObservers, transportObservers, endpointObservers)
        {
            _configuration   = configuration;
            BrokerTopology   = brokerTopology;
            _publishTopology = configuration.Topology.Publish;

            _sendTransportProvider    = new Lazy <ISendTransportProvider>(CreateSendTransportProvider);
            _publishTransportProvider = new Lazy <IPublishTransportProvider>(CreatePublishTransportProvider);
        }
Beispiel #16
0
        public static void LogResult(this BrokerTopology layout)
        {
            foreach (var topic in layout.Topics)
            {
                _log.InfoFormat("Topic: {0}, type: {1}, durable: {2}, auto-delete: {3}", topic.EntityName, topic.Durable, topic.AutoDelete);
            }

            foreach (var consumer in layout.QueueSubscriptions)
            {
                _log.InfoFormat("TopicSubscription: source {0}, destination: {1}", consumer.Source.EntityName, consumer.Destination.EntityName);
            }
        }
        public ServiceBusEntityReceiveEndpointContext(IServiceBusHostConfiguration hostConfiguration, IServiceBusEntityEndpointConfiguration configuration,
                                                      BrokerTopology brokerTopology, Func <IClientContextSupervisor> supervisorFactory)
            : base(hostConfiguration, configuration)
        {
            _hostConfiguration = hostConfiguration;

            BrokerTopology = brokerTopology;

            GetOrAddPayload(() => _hostConfiguration.HostTopology);

            _clientContext = new Recycle <IClientContextSupervisor>(supervisorFactory);
        }
        public RabbitMqQueueReceiveEndpointContext(IRabbitMqHostConfiguration hostConfiguration, IRabbitMqReceiveEndpointConfiguration configuration,
                                                   BrokerTopology brokerTopology, ReceiveSettings settings)
            : base(hostConfiguration, configuration)
        {
            _hostConfiguration = hostConfiguration;
            _settings          = settings;

            ExclusiveConsumer = configuration.Settings.ExclusiveConsumer;
            BrokerTopology    = brokerTopology;

            _modelContext = new Recycle <IModelContextSupervisor>(() => new ModelContextSupervisor(hostConfiguration.ConnectionContextSupervisor));
        }
        public static void LogResult(this BrokerTopology topology)
        {
            foreach (var topic in topology.Topics)
            {
                LogContext.Info?.Log("Topic: {Topic}", topic.TopicDescription.Path);
            }

            foreach (var subscription in topology.Subscriptions)
            {
                LogContext.Info?.Log("Subscription: {Subscription}, topic: {Topic}", subscription.SubscriptionDescription.SubscriptionName,
                                     subscription.SubscriptionDescription.TopicPath);
            }
        }
Beispiel #20
0
        public static void LogResult(this BrokerTopology layout)
        {
            foreach (var exchange in layout.Topics)
            {
                _log.InfoFormat("Topic: {0}, type: {1}, durable: {2}, auto-delete: {3}", exchange.EntityName, exchange.Durable, exchange.AutoDelete);
            }

            foreach (var consumer in layout.Consumers)
            {
                _log.InfoFormat("Consumer: source {0}, destination: {1}, selector: {2}", consumer.Source.EntityName, consumer.Destination.EntityName,
                                consumer.Selector);
            }
        }
        public static void LogResult(this BrokerTopology layout)
        {
            foreach (var exchange in layout.Exchanges)
            {
                _log.InfoFormat("ExchangeName: {0}, type: {1}, durable: {2}, auto-delete: {3}", exchange.ExchangeName, exchange.ExchangeType, exchange.Durable, exchange.AutoDelete);
            }

            foreach (var binding in layout.ExchangeBindings)
            {
                _log.InfoFormat("ExchangeName Binding: source {0}, destination: {1}, routingKey: {2}", binding.Source.ExchangeName, binding.Destination.ExchangeName,
                                binding.RoutingKey);
            }
        }
        public static void LogResult(this BrokerTopology topology)
        {
            foreach (var exchange in topology.Topics)
            {
//                _log.InfoFormat("ExchangeName: {0}, type: {1}, durable: {2}, auto-delete: {3}", exchange.Name, exchange.Type, exchange.Durable, exchange.AutoDelete);
            }

            foreach (var binding in topology.Subscriptions)
            {
                //              _log.InfoFormat("ExchangeName Binding: source {0}, subscriptionName: {1}, routingKey: {2}", binding.Source.Name, binding.SubscriptionName,
                //                binding.RoutingKey);
            }
        }
Beispiel #23
0
        public static void LogResult(this BrokerTopology layout)
        {
            foreach (var exchange in layout.Exchanges)
            {
                LogContext.Info?.Log("Exchange: {ExchangeName}, type: {ExchangeType}, durable: {Durable}, auto-delete: {AutoDelete}", exchange.ExchangeName,
                                     exchange.ExchangeType, exchange.Durable, exchange.AutoDelete);
            }

            foreach (var binding in layout.ExchangeBindings)
            {
                LogContext.Info?.Log("Binding: source {Source}, destination: {Destination}, routingKey: {RoutingKey}", binding.Source.ExchangeName,
                                     binding.Destination.ExchangeName, binding.RoutingKey);
            }
        }
        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);
        }
        public RabbitMqReceiveEndpointTopology(IRabbitMqEndpointConfiguration configuration, Uri inputAddress, IMessageSerializer serializer,
                                               IRabbitMqHost host, BusHostCollection <RabbitMqHost> hosts, BrokerTopology brokerTopology)
        {
            InputAddress    = inputAddress;
            _configuration  = configuration;
            _serializer     = serializer;
            _host           = host;
            _brokerTopology = brokerTopology;

            _hosts = hosts;

            _consume = configuration.Topology.Consume;

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

            _sendTransportProvider   = new Lazy <ISendTransportProvider>(CreateSendTransportProvider);
            _sendEndpointProvider    = new Lazy <ISendEndpointProvider>(CreateSendEndpointProvider);
            _publishEndpointProvider = new Lazy <IPublishEndpointProvider>(CreatePublishEndpointProvider);
        }
Beispiel #26
0
 public TopicSendSettings(TopicDescription description, BrokerTopology brokerTopology)
 {
     _description    = description;
     _brokerTopology = brokerTopology;
 }
 public ConfigureTopologyFilter(TSettings settings, BrokerTopology brokerTopology)
 {
     _settings       = settings;
     _brokerTopology = brokerTopology;
 }
Beispiel #28
0
 public Settings(TopicDescription topicDescription, BrokerTopology brokerTopology)
 {
     TopicDescription = topicDescription;
     BrokerTopology   = brokerTopology;
 }
 public ConfigureTopologyFilter(TSettings settings, BrokerTopology brokerTopology, bool removeSubscriptions)
 {
     _settings            = settings;
     _brokerTopology      = brokerTopology;
     _removeSubscriptions = removeSubscriptions;
 }
        IAgent <SendEndpointContext> GetSendEndpointContextSource(IServiceBusHost host, SendSettings settings, BrokerTopology brokerTopology)
        {
            IPipe <NamespaceContext> namespacePipe =
                Pipe.New <NamespaceContext>(x => x.UseFilter(new ConfigureTopologyFilter <SendSettings>(settings, brokerTopology, false)));

            var contextFactory = new QueueSendEndpointContextFactory(host.MessagingFactoryCache, host.NamespaceCache, Pipe.Empty <MessagingFactoryContext>(),
                                                                     namespacePipe, settings);

            return(new SendEndpointContextCache(contextFactory));
        }