Reputation: 253
Suppose a JMS message got to onMessage method in JMS client receiver. Broker (IBM MQ) is on other JVM. Just after that - the JMS client's JVM crushed (before ACKNOWLEDGE was made).
I'm using CLIENT ACKNOWLEDGE. Not transacted.
Will the broker get an exception (what exception ?) when the client crashed ? Will the message stay in the queue ? Will the message be redeliver and when/how ?
Upvotes: 0
Views: 706
Reputation: 15263
Firstly IBM MQ does not run in a JVM. IBM MQ queue manager run-time comprises a bunch of coordinated processes.
Queue managers processes does recognize termination of client applications and does clean up.
When CLIENT_ACKNOWLEDGE mode is used, IBM MQ JMS client retrieves the messages from a queue under a SYNC_POINT, so the message will not be removed from the queue until it is acknowledged by the application. The message will be re-delivered when the application resumes i.e. calls connection.start() method. However a message will not be redelivered to application if it's Backout count exceeds Backout threshold (BOTHRESH). In that case the message will be moved to backout queue(BOQNAME) if defined. If for some reason message can not be move to backout queue, then the message will be moved to dead letter queue (DLQ) defined on the queue manager.
Upvotes: 1