Application Messaging
Configuring Multiple Clients To Read From a Single QueueThe WebSphere MQ interfaces and the message queue polling feature of the object spawner can be used to distribute the processing of messages on a message queue across one or more machines. The result is enhanced performance, load balancing, and hardware redundancy. Messages can only be retrieved from local queues. In order to enable multiple machines to process messages on a single queue, you must have a full WebSphere MQ (server) installation on the machine that will act as the server. The WebSphere MQ Clients use the queue manager on the server as their queue manager, so any local queues that are defined on that queue manager are also local to the client installations. The WebSphere MQ Clients can connect to a WebSphere MQ server on any supported platform. Note that message queuing applications on the machine where the queue manager is installed can access the queues directly, and they do not need to be configured as clients, although they can be. The following diagram illustrates a sample configuration. The queue manager (MYQMGR) is running on Server1 and is managing the queue for each of the WebSphere MQ Clients (CLIENT1, CLIENT2, and CLIENT3). All three clients are communicating with the queue manager through the same server connection channel (SERVER.CHANNEL1). The object spawners on each of the clients can start one or more SAS sessions as needed in order to receive messages from the queue. SAS sessions can also be started by the object spawner and run on the server. A SAS session running on the server does not need to run as a WebSphere MQ Client application; it behaves as a WebSphere MQ server application. To configure the queue manager on the server:
This example provides basic configuration information for configuring several clients to receive messages from a queue on one server. See the documentation in the WebSphere MQ Information Center for additional information about the MCAUSER ID, Access Control, and configuring queue managers, queues, channels, clients, and other objects. |