Affects Version/s: 1.5.2, 1.5.3
Fix Version/s: 1.5.4
When using temp queues, after a while, methods on it will start hanging. I have attached a test case which will reproduce the problem.
Requires NUnit framework, Apache.NMS and Apache.NMS.ActiveMQ.
Note1: This is also happening with JMS in our field test environment, so it does not seem to be related to NMS
Note2: We are actually not using NMS/JMS API directly like in this test, but we are using spring framework (.net) with MessageListenerContainer and NmsTemplate on top, so excuse me if my code is not quite good, I had to quickly rewrite it to reproduce the problem directly with NMS only.
Take a look in the activemq web gui under "Messages Dequeued", and start the test.
It will run for some hundred messages, and then hang , sometimes on CreateTemporaryQueue(), sometimes on CreateConsumer(tempQueue) (pause execution to see) and sometimes an exception is thrown on tempQueue.Delete (Exception of type 'Apache.NMS.NMSConnectionException' was thrown.) with InnerException null.
If you try to comment out "tempQueue = session2.CreateTemporaryQueue();" and uncomment "tempQueue = SessionUtil.GetDestination(session2, "testqueue.response");" you will see that it runs for thousands of messages without any problems.
We have switched to using permanent queues like this (with correlationId) in our test environment now, and it seems to be working fine. But I thought I'd report it so that you know about it.
ActiveMQ 5.5.1 (also tried 5.5.1 02-02 from fusesource)