Esempio n. 1
0
 public void Dispose()
 {
     if (internalConsumer != null)
     {
         internalConsumer.Dispose();
     }
 }
Esempio n. 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();
        }
Esempio n. 3
0
        /// <inheritdoc />
        public void Dispose()
        {
            if (disposed)
            {
                return;
            }
            disposed = true;

            eventBus.Publish(new StoppedConsumingEvent(this));

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

            consumerCancellation.OnCancel(queue);

            eventBus.Publish(new StoppedConsumingEvent(this));

            internalConsumer?.Dispose();
        }