[jboss-user] [EJB/JBoss] - Re: MDB 'at most, once' delivery (Ack before onMessage)
azda
do-not-reply at jboss.com
Fri Mar 20 10:49:48 EDT 2009
Ok, I checked and JMSRedelivered is set to false.
After pouring over the specs, I think I've corrected some of my misunderstandings.
According to the JMS spec, with AUTO_ACKNOWLEDGE, the acknowledgment occurs after receive or onMessage. Since the MDB is using the MessageListener interface, I would assume the receipt must happen after onMessage. I guess what I'm really after is CLIENT_ACKNOWLEDGE, which the EJB spec does not support. (Unfortunate, because I'll just have to waste time doing all the JMS and thread pool programming to simulate an EJB container with this functionality. That, or do duplicate checking)
All that said, I still think there is a bug with AUTO_ACKNOWLEDGE. The JMS spec states that the client should be prepared for re-delivery of the last consumed message, for this very reason. (Processing occurring in onMessage, and JMS crashing before receipt). It states that in this situation, JMSRedelivered should be set to true. (Which it is not in my example). I'll have to do more testing, and take my questions to the JMS forum.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219887#4219887
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219887
More information about the jboss-user
mailing list