After upgrading to RabbitMQ 4.3, basic.nack does not increase delivery count
search cancel

After upgrading to RabbitMQ 4.3, basic.nack does not increase delivery count

book

Article ID: 448939

calendar_today

Updated On:

Products

VMware Tanzu Platform Spring

Issue/Introduction

This KB discuss why after upgrading to RabbitMQ 4.3.x, basic.nack does not increase delivery count. This KB also discuss difference on behaviour between basic.reject and basic.nack and also why using basic.reject increase delivery-count.

Resolution

The behaviour when using basic.nack on RabbitNQ 4.3.x does not increase delivery count is intentional

Let us first check the difference between basic.reject and basic.nack here:

Feature

basic.rejectbasic.nack
OriginStandard AMQP 0-9-1RabbitMQ Extension
Batch ProcessingSingle message onlySupports single or multiple messages
Requeue OptionYes (requeue=true/false)Yes (requeue=true/false)
Delivery-CountIncrements header (Processing failed)Does not increment (Consumer didn't process)
 
Delivery-count is increased on basic.reject however delivery-count is not incremented when using basic.nack starting RabbitMQ 4.3 onwards is by design so that AMQP client can control whether to increase the delivery-count.