Exemplo n.º 1
0
        private void CancelConsumer()
        {
            if (_consumer != null)
            {
                if (_consumer.IsRunning)
                {
                    Channel.BasicCancel(_consumerTag);
                }

                _consumer = null;
            }
        }
Exemplo n.º 2
0
        protected virtual void CancelConsumer()
        {
            if (_consumer != null)
            {
                if (_consumer.IsRunning)
                {
                    _consumer.OnCancel();
                }

                _consumer = null;
            }
        }
Exemplo n.º 3
0
        protected virtual void CancelConsumer()
        {
            if (_consumer != null)
            {
                if (_consumer.IsRunning)
                {
                    Channel.BasicCancel(_consumerTag);
                }

                _consumer = null;
            }
        }
Exemplo n.º 4
0
        private void CreateConsumer()
        {
            _consumer = new PullConsumer(Channel, _batchSize);

            Channel.BasicConsume(_queueName, false, _consumerTag, SetQueueArguments(), _consumer);

            _consumer.HandleBasicConsumeOk(_consumerTag);

            _logger.Value.InfoFormat("RmqMessageConsumer: Created consumer for queue {0} with routing key {1} via exchange {2} on subscription {3}",
                                     _queueName,
                                     _routingKeys,
                                     Connection.Exchange.Name,
                                     Connection.AmpqUri.GetSanitizedUri()
                                     );
        }
Exemplo n.º 5
0
        protected virtual void CreateConsumer()
        {
            _consumer = new PullConsumer(Channel);

            Channel.BasicQos(0, (ushort)_batchSize, false);

            Channel.BasicConsume(_queueName, false, Connection.Name, SetQueueArguments(), _consumer);

            _consumer.HandleBasicConsumeOk(String.Empty);

            _logger.Value.InfoFormat("RmqMessageConsumer: Created consumer for queue {0} with routing key {1} via exchange {2} on connection {3}",
                                     _queueName,
                                     _routingKeys,
                                     Connection.Exchange.Name,
                                     Connection.AmpqUri.GetSanitizedUri()
                                     );
        }