protected virtual void CreateConsumer()
        {
            _consumer = new QueueingBasicConsumer(Channel);

            Channel.BasicConsume(_queueName, AutoAck, string.Empty, SetConsumerArguments(), _consumer);

            _consumer.HandleBasicConsumeOk(string.Empty);

            Logger.InfoFormat("RmqMessageConsumer: Created consumer with ConsumerTag {4} for queue {0} with routing key {1} via exchange {2} on connection {3}",
                              _queueName,
                              _routingKey,
                              Configuration.Exchange.Name,
                              Configuration.AMPQUri.GetSanitizedUri(),
                              _consumer.ConsumerTag);
        }
        protected virtual void CreateConsumer()
        {
            _consumer = new QueueingBasicConsumer(Channel);

            Channel.BasicQos(0, _preFetchSize, false);

            Channel.BasicConsume(_queueName, AutoAck, string.Empty, SetConsumerArguments(), _consumer);

            _consumer.HandleBasicConsumeOk(string.Empty);

            _logger.Value.InfoFormat("RmqMessageConsumer: Created consumer with for queue {0} with routing key {1} via exchange {2} on connection {3}",
                                     _queueName,
                                     _routingKeys,
                                     Connection.Exchange.Name,
                                     Connection.AmpqUri.GetSanitizedUri()
                                     );
        }
Exemple #3
0
 /// <summary>
 /// Handles the basic consume ok.
 /// </summary>
 /// <param name="consumerTag">The consumer tag.</param>
 public void HandleBasicConsumeOk(string consumerTag)
 {
     _basicConsumer.HandleBasicConsumeOk(consumerTag);
 }