views:

50

answers:

1

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 not been ack'd), which corresponds to retracting these messages from the queues that they've been routed to.

I haven't found this functionality in AMQP or in the RabbitMQ API; perhaps I haven't searched well enough? Or will I have to use a workaround (it's not hard, but still)?

A: 

At least two ways to achieve your target:

Sergei Zimakov
Nope, this solves a different problem. I don't need to reject a message at the consumer side, I want to cancel its delivery from the producer side, so that the message does not reach a consumer like if it never existed at all. In my problem, a consumer can't decide whether a message should be rejected.
jkff
If messages successfuly published and you need to remove them from known queue, then subscribe ot it and consume them in producer.
Sergei Zimakov