users@glassfish.java.net

Strange behavior of JMS queue in Glassfish 3.1.2

From: Alberto Gori <A.Gori_at_siaspa.com>
Date: Thu, 23 May 2013 16:08:37 +0000

My application consumes JMS messages in a Glassfish 3.1.2 server and OpenMQ as JMS provider.
The strange behavior happens when a consumer fails to process a message. In this situation Glassfish correctly move the message to the Dead Message Queue (after 2 attempts). And this is fine.
When I restart the server, the message stored in the DMQ, is sent again to the original destination (and that's ok, althoug I didn't expect this behavior). Now, also if the consumer succeed, the message remains in the destination.
That's incorrect because, after another restart of the server, the message is consumed again. Strangely this time the message is permanently removed from the queue.

The questions are:

-why the message remains in the queue?
-And why GF try to move automatically the message from the DMQ into the original one, after a restart?

Thanks.