users@glassfish.java.net

Re: JMS: Queue-Ordering

From: <jmilkiewicz_at_gmail.com>
Date: Wed, 14 Mar 2012 21:21:15 +0100

@Nigel
 Patrick seems to confirm what you just say but honestly i am really
surprised that it can in this way. Till now i lived in a word that when
MDB throws a runtime exception, a message is rollbacked (not acknowledged),
 if it is not moved to dead message queue, it's re-delivery counter will be
increased and finally message will be redelivered in a non-defined future.
So basically throwing an exception or rollbacking a message will basically
be the same...
I didn't suspect some intermediate layer between broker and MDB i.e MQ
client that can be controlled in some manner, like throwing an exception
from onmessage to prevent other messages (message2, message3) to be
provided to onMessage before the previous message (message1) is not
succesfully processed or moved to dead letter queue.
Can you tell me if this spefic MQ client behavior specific to Oracle
Glassfish Server Message Queue or it is just part of JMS/MDB specification?

br Jakub
p.s thx for a lesson.

W dniu 13 marca 2012 11:11 użytkownik Nigel Deakin
<nigel.deakin_at_oracle.com>napisał:

> Throwing an exception results in this: message 1 causes an exception, then
>> it is tried again (good!) after less than a second (bad, it is extremely
>> unlikely that the issue has been resolved), fails again, is moved to the
>> dead-message-queue and processing continues with message 2.
>>
>> So: that would be a nice solution, if I were able to change the behaviour
>> regarding the dead-message-queue. And a longer retry-interval would be
>> nice.
>>
>
> You can do this by setting activation config properties for the MDB as
> documented here:
> http://docs.oracle.com/cd/**E18930_01/html/821-2438/aeooq.**html#scrolltoc<http://docs.oracle.com/cd/E18930_01/html/821-2438/aeooq.html#scrolltoc>
>
> endpointExceptionRedeliveryAtt**empts (default = 6) - Number of times to
> redeliver a message when MDB throws an exception during message delivery
>
> sendUndeliverableMsgsToDMQ (default=true) - Place message in dead message
> queue when MDB throws a runtime exception and number of redelivery attempts
> exceeds the value of endpointExceptionRedeliveryAtt**empts? If false, the
> Message Queue broker will attempt redelivery of the message to any valid
> consumer, including the same MDB.
>
> endpointExceptionRedeliveryInt**erval [this is not documented, which is a
> known documentation bug] - Interval between redelivery attempts (ms)
>
> (These only apply if you're using the default, built-in jmsra resource
> adapter)
>
> Nigel
>