RabbitMQ & AMQP (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)
How do Consumer Acknowledgements (`basic.ack`, `basic.nack`, `basic.reject`) work?
junior LevelrabbitmqBasic
In Simple Words: Consumer acknowledgments inform the broker whether a message was processed successfully:
basic.ack(deliveryTag, multiple): Confirms successful processing. The broker safely purges the message from the queue.basic.reject(deliveryTag, requeue): Rejects a single message.- If
requeue=true: The message is returned to the queue to be redelivered. - If
requeue=false: The message is discarded or routed to a Dead Letter Exchange (DLX).
- If
basic.nack(deliveryTag, multiple, requeue): AMQP extension toreject. Allows rejecting multiple messages at once.