当前位置: 动力学知识库 > 问答 > 编程问答 >

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?

分享给朋友:
您可能感兴趣的文章:
随机阅读: