[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: JBMESSAGING-126 -- JMS expiration
timfox
do-not-reply at jboss.com
Fri Nov 17 10:00:50 EST 2006
JBM itself needs it's own DLQ logic since we won't always have JCA. E.g. in the standalone server case.
Before a message is sent to a message listener, or before a call to receive() returns we check the delivery counts property (JMSXDeliveryCount) of the message.
If it has exceeded the max delivery attempts as specified in the server peer config then it is sent to the DLQ.
In the case of an MDB - this AFAIK is still implemented as a message listener (please correct me if I am wrong) and delivery is handled by JBM so the same will apply.
Delivery count can be incremented in the following situations:
a) A RuntimeException is thrown from onMessage and ack mode = auto ack or dups ok, retry is immediately attempted (in JBM code).
b) Session gets closed before acking messages so messages are nacked back to the destination.
BTW I'm unclear as to how you keep track of how many times delivery has been attempted in the JCA layer? JMSXDeliveryCount is an optional property not supported by all messaging systems, so if you rely on that your code won't necessary work with other messaging systems.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986846#3986846
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986846
More information about the jboss-dev-forums
mailing list