This topic has not yet been written. The content below is from the topic description.
Chapter 29. Pre-Acknowledge Mode JMS specifies 3 acknowledgement modes: AUTO_ACKNOWLEDGE CLIENT_ACKNOWLEDGE DUPS_OK_ACKNOWLEDGE However there is another case which is not supported by JMS: In some cases you can afford to lose messages in event of failure, so it would make sense to acknowledge the message on the server before delivering it to the client. This extra mode is supported by HornetQ and will call it pre-acknowledge mode. The disadvantage of acknowledging on the server before delivery is that the message will be lost if the system crashes after acknowledging the message on the server but before it is delivered to the client. In that case, the message is lost and will not be recovered when the system restart. Depending on your messaging case, pre-acknowledgement mode can avoid extra network traffic and CPU at the cost of coping with message loss. An example of a use case for pre-acknowledgement is for stock price update messages. With these messages it might be reasonable to lose a message in event of crash, since the next price update message will arrive soon, overriding the previous price. Note Please note, that if you use pre-acknowledge mode, then you will lose transactional semantics for messages being consumed, since clearly they are being acknowledged first on the server, not when you commit the transaction. This may be stating the obvious but we like to be clear on these things to avoid confusion!