I finally moved away from the idea to use the session threads. Now my listener schedules the handling of each message into a thread pool (see SimpleMessageListenerContainer.setThreadExecutor)
In addition i use a different connection uri with new parameters: alwaysSessionAsync=false makes sure that my vm connection to the embedded broker does NOT create one thread per session (as i have one session per listener and thousands of listeners). like this my config starts the simplemessagelistenercontainer in the internal activemq task thread and the container schedules it into a thread pool. unfortunately the activemq task threads are very slow. So i would like to use the async=false (NOT jms.sendAsync) to use the message sending thread to handle the message and push it into the listener where its scheduled into the handler thread pool. see: http://fusesource.com/wiki/display/ProdInfo/Understanding+the+Threads+Allocated+in+ActiveMQ Unfortunately this causes a deadlock (according to yourkit) between my sending thread and the ActiveMQ Broker[name] thread. How can i make these two properties work? or alternatively: how can i speed up the embedded activemq for async sends? -- View this message in context: http://activemq.2283324.n4.nabble.com/Sugestions-how-to-listen-on-several-thousand-topics-with-spring-tp4653164p4653243.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.