public void Dispose() { if (internalConsumer != null) { internalConsumer.Dispose(); } }
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(); }
/// <inheritdoc /> public void Dispose() { if (disposed) { return; } disposed = true; eventBus.Publish(new StoppedConsumingEvent(this)); internalConsumer?.Dispose(); }
public void Dispose() { if (disposed) { return; } disposed = true; consumerCancellation.OnCancel(queue); eventBus.Publish(new StoppedConsumingEvent(this)); internalConsumer?.Dispose(); }