webclimber
webclimber

Reputation: 2640

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

Upvotes: 1

Views: 2945

Answers (2)

Don Branson
Don Branson

Reputation: 13709

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.

Upvotes: 0

Eric Petroelje
Eric Petroelje

Reputation: 60508

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

Upvotes: 2

Related Questions