Workload balancing for message driven beans when using WebSphere Application Server clusters

When using message driven bean applications deployed in a WebSphere® Application Server 7.0 and WebSphere Application Server 8.0 cluster, and configured to run in IBM® MQ messaging provider normal mode, one of the cluster members processes the majority of the messages. You can balance the workload of cluster members in order to distribute the processing of messages across more than one cluster member.

IBM MQ includes a feature called Asynchronous consume, which allows applications to consume messages asynchronously from a queue using APIs called MQCB and MQCTL.

Message driven bean applications running inside of WebSphere Application Server 7.0 and WebSphere Application Server 8.0, that use IBM MQ messaging provider normal mode will automatically make use of this feature. When the applications start up, they will set up an asynchronous consumer on the JMS destination that they have been configured to monitor by calling MQCB. The MQCTL API is then called to indicate that the application is ready to receive messages from the JMS destination.

When message driven bean applications have been deployed into a WebSphere Application Server cluster, each cluster member will set up an asynchronous consumer for the JMS destination that the message-driven bean is monitoring for messages. The IBM MQ queue manager that hosts the JMS destination is then responsible for notifying the cluster member when there is a suitable message on the JMS destination for it to process.

When WebSphere Application Server is connecting to an IBM MQ queue manager, messages that arrive on a JMS destination will be distributed more evenly to all of the asynchronous consumers that have been registered on that JMS destination. For message-driven bean applications deployed inside of a WebSphere Application Server 7.0 and WebSphere Application Server 8.0 cluster, this means that the messages will be distributed more evenly between cluster members.