Hi all, I am experiencing an issue running request/reply scenarios with AMQ 3.1/3.2. Each reply increases the number of JmsSessionDispatcher threads both within consumer and broker until one of them finally crashes with out of HEAP Memory.
This only happens when sending the request with a replyTo set to a newly generated TemporaryTopic as commonly suggested for the request/reply use case in JMS. Using the debugger I found that it is related to TempDestinationAdvisor. Within its start() method a new session with a new JMSSessionDispatcher thread is created for each reply when sending the reply using MessageProducer method send (Destination destination, Message message, int deliveryMode, int priority, long timeToLive). My work around is to reuse a fixed Topic or Queue for the reply (similar as described at http://activemq.org/How+should+I+implement+request+response+with+JMS). However I am still wondering why this session and its JmsSessionDispatcher thread never gets cleaned up after the reply was delivered. I also found no way to access it so close it from outsite. Has anyone used TemporaryTopics for request/response and can help? Thomas
