The basic.nack command is apparently a RabbitMQ extension, which extends the functionality of basic.reject to include a bulk processing mode. Both include a “bit” (i.e. boolean) flag of requeue
, so you actually have several choices:
nack
/reject
withrequeue=1
: the message will be returned to the queue it came from as though it were a new message; this might be useful in case of a temporary failure on the consumer sidenack
/reject
withrequeue=0
and a configured Dead Letter Exchange (DLX), will publish the message to that exchange, allowing it to be picked up by another queuenack
/reject
withrequeue=0
and no DLX will simply discard the messageack
will remove the message from the queue even if a DLX is configured
If you have no DLX configured, always using ack
will be the same as nack
/reject
with requeue=0
; however, using the logically correct function from the start will give you more flexibility to configure things differently later.