Access the AMQP channel via RmqContext.getChannelRef() and the raw message via ctx.getMessage(). Call channel.ack() on success and channel.nack() on failure. The second and third arguments to nack() control whether the message is requeued or dead-lettered.
noAck: false must be set in the microservice options — otherwise NestJS auto-acks before your handler runs.
channel.ack(msg) — removes the message from the queue after successful processing.
channel.nack(msg, false, true) — returns the message to the queue for redelivery.
channel.nack(msg, false, false) — dead-letters the message instead of requeuing.
Always ack or nack in a try/finally to prevent message leaks if the handler throws unexpectedly.