users@glassfish.java.net

RE: Strange behavior of JMS queue in Glassfish 3.1.2

From: David Zhao <liang.x.zhao_at_oracle.com>
Date: Thu, 23 May 2013 19:08:27 -0700 (PDT)

Hi Alberto,

 

You probably meet the problem which was logged as https://java.net/jira/browse/MQ-227. Please check if that is the same thing with what you spotted.

 

Thanks,

David Zhao

 

From: Alberto Gori [mailto:A.Gori_at_siaspa.com]
Sent: Friday, May 24, 2013 12:09 AM
To: users_at_glassfish.java.net
Subject: Strange behavior of JMS queue in Glassfish 3.1.2

 

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.