users@glassfish.java.net

Re: JMS: Queue-Ordering

From: Nigel Deakin <nigel.deakin_at_oracle.com>
Date: Tue, 13 Mar 2012 10:11:08 +0000

> 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

endpointExceptionRedeliveryAttempts (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 endpointExceptionRedeliveryAttempts? If false, the Message Queue
broker will attempt redelivery of the message to any valid consumer, including the same MDB.

endpointExceptionRedeliveryInterval [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