public void Start()
 {
     try
     {
         if (!string.IsNullOrWhiteSpace(_commandQueueName))
         {
             _removeMessageContext = _messageQueueClient.StartQueueClient(_commandQueueName, _consuemrId, OnMessageReceived, _fullLoadThreshold, _waitInterval);
         }
         _messageProcessor.Start();
     }
     catch (Exception e)
     {
         _logger.Error(e.GetBaseException().Message, e);
     }
 }
Exemple #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);
     }
 }
Exemple #3
0
        public void Start()
        {
            try
            {
                if (!string.IsNullOrWhiteSpace(CommandQueueName))
                {
                    InternalConsumer = MessageQueueClient.StartQueueClient(CommandQueueName, ConsumerId,
                                                                           OnMessageReceived,
                                                                           ConsumerConfig);
                }

                MessageProcessor.Start();
            }
            catch (Exception e)
            {
                Logger.LogError(e, $"Command Consumer {ConsumerId} Start Failed");
            }
        }
Exemple #4
0
        public void Start()
        {
            try
            {
                if (!string.IsNullOrWhiteSpace(_commandQueueName))
                {
                    _messageQueueClient.StartQueueClient(_commandQueueName, OnMessageReceived);
                }
            }
            catch (Exception e)
            {
                _logger.Error(e.GetBaseException().Message, e);
            }
            //try
            //{
            //    _commandQueueClient = _serviceBusClient.CreateQueueClient(_commandQueueName);
            //    _commandConsumerTask = Task.Factory.StartNew(ConsumeMessages, TaskCreationOptions.LongRunning);

            //}
            //catch (Exception ex)
            //{
            //    _logger.Error(ex.GetBaseException().Message, ex);
            //}
        }