[Design of Messaging on JBoss (Messaging/JBoss)] - Re: JBMESSAGING-126 -- JMS expiration
by timfox
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
19 years, 4 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: JBMESSAGING-126 -- JMS expiration
by weston.price@jboss.com
A rudimentary implementation would be fairly straightforward. Something along the lines of sending them off to the DLQ or a specified expiration destination.
Is the JBM DLQ always active? I am a bit confused about the 'two' DLQ implementations and which one takes precendence. Does JBM do DLQ handling even with the existence of a connection consumer for a connection?
Maybe we should think about 'uniting' these. Either that or I am just missing something (more likely).
The MDB container in the case of JCA inflow pretty much does nothing in terms of DLQ handling, transactions etc. This is all handled on my end. Basically the JMS/JCA adapter unifies the old ASF and JMSContainerInvoker functionality.
The JCA DLQ handler detects redelivery attempts and either allows onMessage() to execute or shuffles the message off to the DLQ which is specified as a property of the ActivationSpec. This is where the expiry stuff happens as well.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986845#3986845
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986845
19 years, 4 months