videlalvaro/RabbitMqBundle — pull request #109 by slot (2013-04-26 14:45:25+00:00)
Title: REJECT and DROP

In addition to ACK and REJECT and REQUEUE I added the possibility for a consumer to REJECT and DROP a message.

This is especially useful if you want to make use of dead letter queues and want to move a message to the dead letter queue after you consumed it one time.

For ease of use I added constants to Consumer Interface, so in a consumer you can return like so:

return ConsumerInterface::MSG_REJECT_REQUEUE

return ConsumerInterface::MSG_REJECT_ACK

return ConsumerInterface::MSG_REJECT <-- new

To be backwards compatible (at least 99%) i used the integer value "-1" to flag reject&drop.

Further I added more documentation on setting "x-dead-letter-queue" options for queues.