[jboss-dev-forums] [Design of JBoss jBPM] - Re: Knowledge of redelivery
genman
do-not-reply at jboss.com
Wed Aug 1 00:08:37 EDT 2007
The redelivery flag is not necessarily a useful thing to have access to.
If the JMS provider restarts, it might actually be false even though the message was in the middle of processing earlier. Or, the redelivery flag might actually be set to true even if your MDB.onMessage() was never reached. This could happen if the inflow adapter loses a connection to the JMS provider on another machine.
The spec also says: "If a client receives a message with the redelivered indicator set, it is likely, but not guaranteed, that this message was delivered to the client earlier but the client did not acknowledge its receipt at that earlier time."
JBoss provides a redelivery count as well (I originally wrote this feature) which is persisted, so is a little more reliable. But I wouldn't rely on this for performing transaction compensations.
If a node needs to take additional action on redelivery, for example, then the best thing is to check every time a message is received that that action was or was not performed.
What might be useful to provide are checkpoints that are persisted (not as the MDB transaction context) that indicate some non-transactional resource was used earlier.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069470#4069470
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069470
More information about the jboss-dev-forums
mailing list