Example #1
0
        public override void Start()
        {
            base.Start();

            #region init process command reply worker

            try
            {
                if (!string.IsNullOrWhiteSpace(_replyTopicName))
                {
                    _internalConsumer = _messageQueueClient.StartSubscriptionClient(_replyTopicName,
                                                                                    _replySubscriptionName,
                                                                                    _consumerId,
                                                                                    OnMessagesReceived,
                                                                                    _consumerConfig);
                }
            }
            catch (Exception e)
            {
                _logger?.Error(e.GetBaseException().Message, e);
            }

            #endregion

            _messageProcessor.Start();
        }
Example #2
0
 public void Start()
 {
     try
     {
         if (!string.IsNullOrWhiteSpace(_commandQueueName))
         {
             _internalConsumer = _messageQueueClient.StartQueueClient(_commandQueueName, _consumerId,
                                                                      OnMessageReceived,
                                                                      _consumerConfig);
         }
         _messageProcessor.Start();
     }
     catch (Exception e)
     {
         _logger?.Error(e.GetBaseException().Message, e);
     }
 }