Пример #1
0
 public void StartListeners(IMessagingRoot root, ITransportRuntime runtime)
 {
     foreach (var listener in _listeners)
     {
         Endpoints.FillDefault(listener);
     }
 }
Пример #2
0
 void ITransport.StartSenders(IMessagingRoot root, ITransportRuntime runtime)
 {
     foreach (var queue in _queues)
     {
         addQueue(root, runtime, queue);
     }
 }
Пример #3
0
 public void StartListeners(IMessagingRoot root, ITransportRuntime runtime)
 {
     foreach (var endpoint in endpoints())
     {
         endpoint.StartListening(root, runtime);
     }
 }
Пример #4
0
        protected internal ISendingAgent StartSending(IMessagingRoot root, ITransportRuntime runtime,
                                                      Uri replyUri)
        {
            var sender = root.Settings.StubAllOutgoingExternalSenders ? new NulloSender(Uri) : CreateSender(root);

            return(runtime.AddSubscriber(replyUri, sender, this));
        }
Пример #5
0
        public DurabilityAgent(ITransportLogger logger,
                               ILogger <DurabilityAgent> trace,
                               IWorkerQueue workers,
                               IEnvelopePersistence persistence,
                               ITransportRuntime runtime,
                               AdvancedSettings settings)
        {
            if (persistence is NulloEnvelopePersistence)
            {
                _disabled = true;
                return;
            }

            Logger       = logger;
            _trace       = trace;
            _workers     = workers;
            _persistence = persistence;
            _settings    = settings;


            _storage = _persistence.AgentStorage;

            _worker = new ActionBlock <IMessagingAction>(processAction, new ExecutionDataflowBlockOptions
            {
                MaxDegreeOfParallelism = 1,
                CancellationToken      = _settings.Cancellation
            });

            NodeId = _settings.UniqueNodeId;

            IncomingMessages = new RecoverIncomingMessages(persistence, workers, settings, logger);
            OutgoingMessages = new RecoverOutgoingMessages(runtime, settings, logger);
            NodeReassignment = new NodeReassignment(settings);
            ScheduledJobs    = new RunScheduledJobs(settings, logger);
        }
Пример #6
0
        public void StartSenders(IMessagingRoot root, ITransportRuntime runtime)
        {
            var replyUri = ReplyEndpoint()?.ReplyUri();

            foreach (var endpoint in endpoints().Where(x => x.Subscriptions.Any()))
            {
                endpoint.StartSending(root, runtime, replyUri);
            }
        }
Пример #7
0
        private ISendingAgent addQueue(IMessagingRoot root, ITransportRuntime runtime, LocalQueueSettings queue)
        {
            queue.Agent = buildAgent(queue, root);
            _agents     = _agents.AddOrUpdate(queue.Name, buildAgent(queue, root));

            runtime.AddSendingAgent(buildAgent(queue, root));
            runtime.AddSubscriber(queue);

            return(queue.Agent);
        }
Пример #8
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);
        }
Пример #9
0
        protected internal override void StartListening(IMessagingRoot root, ITransportRuntime runtime)
        {
            if (!IsListener)
            {
                return;
            }

            var listener = createListener(root);

            runtime.AddListener(listener, this);
        }
Пример #10
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);
        }
Пример #11
0
        public void StartSenders(IMessagingRoot root, ITransportRuntime runtime)
        {
            var pipeline = root.Pipeline;

            foreach (var endpoint in Endpoints)
            {
                endpoint.Start(pipeline, root.MessageLogger);

                runtime.AddSubscriber(endpoint);
            }
        }
Пример #12
0
        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);
        }
Пример #13
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);
        }
Пример #14
0
 protected internal abstract void StartListening(IMessagingRoot root, ITransportRuntime runtime);
Пример #15
0
 void ITransport.StartListeners(IMessagingRoot root, ITransportRuntime runtime)
 {
     // Nothing
 }
Пример #16
0
 public void StartListeners(IMessagingRoot root, ITransportRuntime runtime)
 {
     throw new NotImplementedException();
 }
Пример #17
0
 public RecoverOutgoingMessages(ITransportRuntime runtime, AdvancedSettings settings, ITransportLogger logger)
 {
     _runtime  = runtime;
     _settings = settings;
     _logger   = logger;
 }
Пример #18
0
 protected internal override void StartListening(IMessagingRoot root, ITransportRuntime runtime)
 {
     throw new NotSupportedException();
 }