[rabbitmq-discuss] How amqp-client modify & reject(requeue true) a message back to the original queue in rabbit broker?

Matthias Radestock matthias at rabbitmq.com
Fri Dec 21 19:54:48 GMT 2012


On 21/12/12 02:02, javaLee wrote:
> /*M*//y understanding/: Queue in rabbitmq broker will never drop the
> unacknowledged message before client ack-or-reject it,
> ack-or-reject-operationing on the client side do not need resend the
> message to rabbitmq broker, that's why client side cannot modify the
> message, is that true?

Correct.

> I really need the requeue function, because on client side i want do
> some retry operation with spring-retry. if max-retry-count is exhausted
> & the message is still not be processing appropriately, i will not
> requeue it (to the original queue) any more & put it to the
> dead-letter-exchange.
> But before put it to the DLX, i really want add some error-description
> to this message, So another consumer that listening to the DLX can
> retrieve & analysis & process it according to the error-description,
> that's why i want modify message before reject it.

So don't use reject. Instead publish the modified message to the 
original queue or DLX - depending on the retry-count - and ack the 
original message.

Regards,

Matthias


More information about the rabbitmq-discuss mailing list