private void ExceptionAckStrategy(IModel model, ulong deliveryTag) { switch (consumerErrorStrategy.PostExceptionAckStrategy()) { case PostExceptionAckStrategy.ShouldAck: model.BasicAck(deliveryTag, false); break; case PostExceptionAckStrategy.ShouldNackWithoutRequeue: model.BasicNack(deliveryTag, false, false); break; case PostExceptionAckStrategy.ShouldNackWithRequeue: model.BasicNack(deliveryTag, false, true); break; case PostExceptionAckStrategy.DoNothing: break; } }
private AckResult ExceptionAckStrategy(IModel model, ulong deliveryTag) { switch (consumerErrorStrategy.PostExceptionAckStrategy()) { case PostExceptionAckStrategy.ShouldAck: model.BasicAck(deliveryTag, false); return(AckResult.Ack); case PostExceptionAckStrategy.ShouldNackWithoutRequeue: model.BasicNack(deliveryTag, false, false); return(AckResult.Nack); case PostExceptionAckStrategy.ShouldNackWithRequeue: model.BasicNack(deliveryTag, false, true); return(AckResult.Nack); case PostExceptionAckStrategy.DoNothing: return(AckResult.Nothing); default: return(AckResult.Nothing); } }