I currently use ActiveMQ to serve a STOMP message queue with several topics. As we are now starting to get several thousand connections to the queue, I have been trying to implement NIO to reduce the number of threads used.

Following the documentation, I have modified my configuration to add NIO as follows:

However, when testing I am still getting two threads per connection - one named NIO Transport Thread and another named BrokerService.

I was expecting thread use to be much lower using NIO. Therefore - am I wrong in my expectations, or are there more configuration changes required for NIO?



Having a quick flick through the ActiveMQ Developer Forums, it appears that there has been a few architectural issues with the way the Stomp transport has historically been implemented in AMQ.

It looks like issue AMQ-2386 may potentially resolve the problem you seem to be experiencing and it might be best checking out a revision >= 813722 of the ActiveMQ trunk to see if it fixes your problem?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.