activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From artnaseef <>
Subject Re: can a client "refuse" a message?
Date Mon, 03 Mar 2014 05:56:27 GMT
JMS does not provide such a method. You could use one queue per consumer and have a consumer
send the message back to an input queueon failure, but it would get complex since a way of
knowing which consumers rejected the message would need to be tracked with the message, as
well as knowing all the consumers and their queues. 

Sent from my iPhone

> On Mar 2, 2014, at 9:36 PM, "Li Li [via ActiveMQ]" <>
> hi all, 
>     can a queue message consumer "refuse" a message after receive a message? 
>     because a client don't know the message in advance. 
>     onMessage(Message msg){ 
>           if(CannotProcess(msg)){ 
>                //refuse this message 
>           } 
>      } 
> what I need is: if the message can't be processed by one client, it 
> can be sent to another consumer. 
> if all consumer "refuse" this message, then this message will be 
> removed to dead letter queue or to the end of the queue. 
> If you reply to this email, your message will be added to the discussion below:
> To start a new topic under ActiveMQ - User, email

> To unsubscribe from ActiveMQ - User, click here.

View this message in context:
Sent from the ActiveMQ - User mailing list archive at
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message