Quantcast

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

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Spring Amqp User
I am use spring amqp, i have  a question:
    is there a way for the client to modify & reject a received message to rabbit broker? 
    the arguments requeue of basicReject() must set to true, right?

my english is not very good, so my question perhaps not very clear, i apologize.

All response will be appreciated.

_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How amqp-client modify & reject(requeue true) a message back to the original queue in rabbit broker?

Emile Joubert
Hi,

On 20/12/12 11:14, Spring Amqp User wrote:
> I am use spring amqp, i have a question: is there a way for the
> client to modify & reject a received message to rabbit broker? the
> arguments requeue of basicReject() must set to true, right?


No it is not possible to modify the message while rejecting with
requeue. The closest approximation would be to acknowledge and republish
with the modifications.


-Emile



_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How amqp-client modify & reject(requeue true) a message back to the original queue in rabbit broker?

Spring Amqp User
Thanks for reply, Emile.
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.

My 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?  



On Fri, Dec 21, 2012 at 12:37 AM, Emile Joubert <[hidden email]> wrote:
Hi,

On 20/12/12 11:14, Spring Amqp User wrote:
> I am use spring amqp, i have a question: is there a way for the
> client to modify & reject a received message to rabbit broker? the
> arguments requeue of basicReject() must set to true, right?


No it is not possible to modify the message while rejecting with
requeue. The closest approximation would be to acknowledge and republish
with the modifications.


-Emile





_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How amqp-client modify & reject(requeue true) a message back to the original queue in rabbit broker?

Matthias Radestock-3
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
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How amqp-client modify & reject(requeue true) a message back to the original queue in rabbit broker?

Spring Amqp User
I am really appreciated for your enthusiastic reply, guys!


On Sat, Dec 22, 2012 at 3:54 AM, Matthias Radestock <[hidden email]> wrote:
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


_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Loading...