PDA

View Full Version : threading model JBossMQ


Ricky22
16-07-2009, 16:21
I am studing the thread model of JBossMQ...so i am trying to find the number of threads that are created and what they serve in the inflow of a message throught JBossMQ (following a JMS message sent by a remote client to an MDB that subscribed to a topic)...
I have find that the threads involved in the path are :
- JMSThread(2)
- JMS SessionPool Worker : ( cached threadpool that manages the OnMessage
method calls?? )
- readTask "UIL2.SocketManager.ReadTask#" and writeTask
UIL2.SocketManager.WriteTask#
- a threadpool "SocketManager.MsgPool@" of size 5

Someone knows something about the argument? Can someone help me?

Thanks a lot

kjkoster
17-07-2009, 09:47
Dear Ricky22,

I'm not sure what you are trying to ask here. Are you looking for people who have done thread counts before to determine the number of threads in JBoss? Are you looking for confirmation of these figures?

If you are studying these things, keep in mind also how many threads are created that serve all messages in all queues, rather than per message. So you may have to find not only the number of threads serving one message, but also find how many are working for 10, 100 and 1000 messages.

Kees Jan

Ricky22
17-07-2009, 10:40
Dear Ricky22,

I'm not sure what you are trying to ask here. Are you looking for people who have done thread counts before to determine the number of threads in JBoss? Are you looking for confirmation of these figures?

If you are studying these things, keep in mind also how many threads are created that serve all messages in all queues, rather than per message. So you may have to find not only the number of threads serving one message, but also find how many are working for 10, 100 and 1000 messages.

Kees Jan

first of all thank you for your reply...
i'm looking for people that can help me to find which threads JBoss creates (and why) for manages the exchange of JMS messages between client and JMS provider (JBossMQ)...
Looking at the source code of JBoss and using Jconsole tool, at the connetion between client-server are created a socket TCP and the readTask (and the writeTask) that read(/write) from the socket the meassages that arrives. At this level are also created a threadpool of size 5.

In the end are created a threadpool Session Worker that, about my opinion, manages the OnMessage method call.

In the middle there are other threads called JMSThread that i haven't very clear what they serve...

My goal is to place these threads at their correct level in the inflow of a message JMS throught JBossMQ...

I hope to be able to explain ;-)...thanks

kjkoster
20-07-2009, 20:00
Dear Ricky22,

Well, I'd love to read the things you have learned after you are done investigating. Could you please post them here?

As for finding out why threads are created, try usign jstack (or kill -3) on a live JBoss server that is actively serving JMS messages. The resulting stack traces can then tell you what each thread is doing, possibly adding more pieces for your puzzle.

You may have to take a few thread dumps. There is a threads tab in JConsole that you can use to look at individual threads, refreshing to take new dumps. You may find that useful too.

Does this help?

Kees Jan