I am using openMQ 4.3, with application deployed on tomcat6 using spring JMS API and am facing out of memory problem because of imqConsumerReader's waiting on SessionQueue.
I have configured 2 queues on OpenMQ. Message production and consumption is asynchronous. Spring's JMSTemplate is used for pushing messages and DefaultMessageListenerContainer is used for consumption.
The 2 queues are success queue and error queue. Initially messages from success queue are consumed and persisted into application database. But if there is any error / exception we are putting it on to error queue. The memory problem is encountered in this flow.
During load test, when we bring the application database down, we see imqConsumerReader threads getting piled up (and in a blocked state) in the application JVM.
After analyzing this with JProfiler, it shows deadlock between imqConsumerReader and SessionQueue threads.
We are using AUTO_ACKNOWLEDGE mode for our app.
My Question are.
1- Why are ConsumerReader threads getting blocked, and waiting on dequeue?
2- Is there a limit to put unconsumed messages in a queue for openMQ?
I'm experiencing the same problem: consumer reader threads piling up and using Spring MDB POJO (messagelistener).
Did you find the cause of the memory problem ?
If yes, can you share the way to fix it ?
Was the application/Spring calling Connection.close or Session.close in the MessageListener ? Could you please provide the Spring application thread dump when the problem occurs ? If the consumerReader threads piled up, it's likely that the application or Spring was creating excessive JMS Sessions ..