activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noel OConnor <>
Subject Re: can a client "refuse" a message?
Date Mon, 03 Mar 2014 05:13:40 GMT
If the mdb is in a transaction you could try rolling it back. If not (I
think) the message should be redelivered if you throw a runtime exception
from within the MDB.

On Mon, Mar 3, 2014 at 3:35 PM, Li Li <> wrote:

> 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.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message