Martin Ritchie wrote:
I don't remember the spec in detail but when should a message be
classed as redelivered?

The JMS spec states that "A session must set the redelivered flag of messages it redelivers due to a recovery" (4.4.11). Rollback is defined as automatically recovering consumed messages (4.4.7).

There is still ambiguity: it isn't explicitly stated whether that applies to messages that were sent to the session but which the application has not seen i.e. that have not been acknowledged (i.e. whether it applies to 'prefetched' messages).

As you say, the safe option is to set redelivered. As Rob points out JMS doesn't directly deal with prefetching which explains this ambiguity (to a degree at least) You can always turn off prefetching. I'd argue that AUTO_ACKNOWLEDGE implies no prefetching, whereas DUPS_OK_ACKNOWLEDGE allows it, but thats another issue really.

Reply via email to