[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: JBoss 2.0 Thread model

timfox do-not-reply at jboss.com
Tue Apr 1 13:21:42 EDT 2008


One way of implementing this is having a set of BlockingQueues one for each "id" value.

Then you have a pool of workers that poll on these queues.

This is basically how a ThreadPoolExecutor works, but instead of a single queue feeding it, you have many queues.

I'd take a look at what Trustin has done in org.apache.mina.filter.executor.OrderedThreadPoolExecutor (which works similarly to how I've described)

You want to avoid having one thread per id value since you may have many thousands of id values.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4140651#4140651

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4140651



More information about the jboss-dev-forums mailing list