I\'ve got something like a job queue over RabbitMQ and, upon a request to cancel a job, I\'d like to retract the tasks that have not yet started processing (their messages have
At least two ways to achieve your target:
basic.reject
will requeue message if requeue=true
is set (otherwise it will reject message).
(supported since RabbitMQ 2.0.0; see http://www.rabbitmq.com/blog/2010/08/03/well-ill-let-you-go-basicreject-in-rabbitmq/).
basic.recover
will ask broker to redeliver unacked messages on channel.