Sunday, April 3, 2011

Parallel processing of JMS messages ?

Is it possible to create a pool of Message Listeners or a Message Driven Beans to process messages from a JMS queue or topic in parallel ?

I am using JBoss and JBoss's JMS

From stackoverflow
  • Yes, if the MDB pool size is greater than one, JBoss should create multiple MDBs to process the messages in parallel.

  • Absolutely. I've done it with JMS queues to create a multi-server pool of listeners in order to process large numbers of transactions. You can use the Competing Consumers pattern. I used a modified one, since we needed to process messages in order within accounts. We used a lease mechanism to allocate servers to account number ranges, providing failover and scalability.

    We were using Tibco's JMS provider, but it works with any JMS provider.

0 comments:

Post a Comment