private void MessageHandlerHandlingComplete(BasicDeliverEventArgs eventArgs)
{
try
{
if (_autoAck && !IsDisposed)
{
#if DEBUG
_watcher.DebugFormat("7. A task to execute the provided callback with DTag: {0} by CTag: {1} has been finished, now ack message", eventArgs.DeliveryTag, eventArgs.ConsumerTag);
#endif
DoAck(eventArgs, this);
}
}
catch (Exception ex)
{
_watcher.Error(ex);
}
finally
{
#if DEBUG
_watcher.DebugFormat("6. A task to execute the provided callback with DTag: {0} by CTag: {1} has been finished, now release the semaphore", eventArgs.DeliveryTag, eventArgs.ConsumerTag);
#endif
_pool.Release();
}
}