public void Dispose()
 {
     if (internalConsumer != null)
     {
         internalConsumer.Dispose();
     }
 }
Exemple #2
0
        private void OnConsumerLost(IInternalConsumer internalConsumer)
        {
            shouldRecover = true; //we need only recovery in case of connection loss, it is not needed to set it subsequently false
            object temp;

            //We should dispose current internal consumer, as pending messages' ack/nack may shutdown it with unknown delivery tag
            internalConsumers.TryRemove(internalConsumer, out temp);
            internalConsumer.Dispose();
            StartConsumingInternal();
        }
Exemple #3
0
        /// <inheritdoc />
        public void Dispose()
        {
            if (disposed)
            {
                return;
            }
            disposed = true;

            eventBus.Publish(new StoppedConsumingEvent(this));

            internalConsumer?.Dispose();
        }
Exemple #4
0
        public void Dispose()
        {
            if (disposed)
            {
                return;
            }
            disposed = true;

            consumerCancellation.OnCancel(queue);

            eventBus.Publish(new StoppedConsumingEvent(this));

            internalConsumer?.Dispose();
        }