示例#1
0
        protected internal override void StartListening(IMessagingRoot root, ITransportRuntime runtime)
        {
            if (!IsListener)
            {
                return;
            }

            var listener = new ConfluentKafkaListener(this, root.TransportLogger, root.Cancellation);

            runtime.AddListener(listener, this);
        }
示例#2
0
        protected internal override void StartListening(IMessagingRoot root, ITransportRuntime runtime)
        {
            if (!IsListener)
            {
                return;
            }

            var listener = createListener(root);

            runtime.AddListener(listener, this);
        }
示例#3
0
        protected internal override void StartListening(IMessagingRoot root, ITransportRuntime runtime)
        {
            if (!IsListener)
            {
                return;
            }

            var listener = new RabbitMqListener(root.TransportLogger, this, Parent);

            runtime.AddListener(listener, this);
        }
        protected internal override void StartListening(IMessagingRoot root, ITransportRuntime runtime)
        {
            if (!IsListener)
            {
                return;
            }

            if (Parent.ConnectionString == null)
            {
                throw new InvalidOperationException("There is no configured connection string for Azure Service Bus, or it is empty");
            }

            var listener = new AzureServiceBusListener(this, Parent, root.TransportLogger, root.Cancellation);

            runtime.AddListener(listener, this);
        }
示例#5
0
        protected internal override void StartListening(IMessagingRoot root, ITransportRuntime runtime)
        {
            if (!IsListener)
            {
                return;
            }

            IListener listener;

            if (ListenerCount > 1)
            {
                listener = new ParallelRabbitMqListener(root.TransportLogger, this, Parent);
            }
            else
            {
                listener = new RabbitMqListener(root.TransportLogger, this, Parent);
            }

            runtime.AddListener(listener, this);
        }