How broken is the MQ threading model?
mikemil Dec 2, 2011 1:30 PMReading the TuningJBossMQ community wiki page, and wondering how broken is the MQ threading model? The text in particular is:
Unfortunately, the threading model is pretty broken in JBossMQ. It has been since the original design. If you are having problems too many threads or too much context switching then you should consider JBoss Messaging, it is more performant and more feature rich for other reasons as well.
We may be reaching that 'broken' point with one of our current customers and need to see if we are at the point of recommending a migration from MQ to Messaging (can't go right to HornetQ right now) or of there is just some configuration that we might have set incorrectly.
We are trying to calculate the number of MQ threads required/setup on a server just to handle a local queue with a remote mdb (on another JBoss server). Digging thru thread dumps, it looks like we get TWO sets of {SocketManager.ReadTask#, SocketManager.WriteTask#, SocketManager.MsgPool} along with a potential Connection Consumer for Subscription thread and a JMS SessionPool Worker thread - all for one mdb/queue setup. At worse this looks like 8 threads for each of these on my server. Does this sound correct? The confusing part is having TWO complete sets of the ReadTask/WriteTask/MsgPool thread. I can understand one set of those per server but TWO, which is why I am wondering if we are seeing this correctly?
Both sets of threads seem to be setup and then pinging back and forth every minute as per the configuration.
Our problem is that our configuration has 200 queues on one server with the mdb remote and that same server defines 200 mdbs pointing to remote queues - which if I do the math correctly - with 8 threads per mqb/queue - we are talking about 3200 threads!!! I hope we have this wrong but just looking for some clarification because if this is basically correct - we don't want to spend any more time trying to get MQ to work and need to quickly get this migrated to Messaging.
Thanks!