WebSphere MQ queue managers

This topic describes queue managers and queues in a WebSphere® MQ network, and how they work when compared with a WebSphere MQ link and its associated messaging engines on a service integration bus.

In a WebSphere MQ network, intercommunication is achieved by sending messages from one queue manager to another. If you define a WebSphere MQ link on one messaging engine in a service integration bus, the WebSphere MQ link can exchange messages with queue managers in a WebSphere MQ network. The particular queue manager that the WebSphere MQ link connects with is called (in service integration terminology) the WebSphere MQ gateway queue manager.

A WebSphere MQ queue manager has a definition for each of its queues. A WebSphere MQ application uses WebSphere MQ API calls to connect to a queue manager and put messages on its queues. If the messages are destined for a WebSphere MQ queue or destined for a messaging engine by way of the WebSphere MQ link on a remote system, the local queue manager holds them in a transmission queue until it is ready to forward them to the remote queue manager. A transmission queue is a special type of local queue on which messages are stored until they can be successfully transmitted and stored at the remote queue manager.

The figure below shows how the WebSphere MQ link and the queue manager in the WebSphere MQ network exchange messages.

In the following figure, there is a service integration bus in a WebSphere Application Server, and a foreign bus which represents a WebSphere MQ network. In the application server there is a messaging engine with a WebSphere MQ link which has an alias destination which translates into a foreign destination in the WebSphere MQ network. Messages on the foreign destination flow to a transmission queue on the WebSphere MQ queue manager. From there the messages are passed to an alias destination in WebSphere MQ. The WebSphere MQ queue manager (in the foreign bus, on the right) has a queue. Messages in this queue flow to a destination on the WebSphere MQ link. For related information, see Foreign buses.

Figure 1. Exchanging messages between a service integration bus and a foreign bus.
This figure is described in the surrounding text.

WebSphere MQ applications can put messages onto a local queue, that is, a queue on the queue manager the application is connected to. A queue manager not only has a definition for each of its queues, it can also have definitions for the queues that are owned by other queue managers. These are called remote queue definitions. WebSphere MQ applications can also put messages targeted at these remote queues. To WebSphere MQ, the messaging engine can be configured to appear to be a remote queue manager. The messaging engine with the WebSphere MQ link engine, can route messages it receives from WebSphere MQ to other messaging engines on the same service integration bus. This is similar to the way a WebSphere MQ gateway queue manager receives messages from the WebSphere MQ link and routes them to destination queue managers in the WebSphere MQ network.

WebSphere MQ messages are transmitted between queue managers by way of channels. A channel is a one-way communication link between two queue managers. It can carry messages destined for any number of queues hosted by the remote queue manager or any number of target queue managers.

If a message is to be sent to a remote queue manager, the local queue manager needs definitions for a transmission queue and a channel to the remote queue manager. Each end of a channel has a separate definition, defining it, for example, as the sending end or the receiving end. A simple channel consists of a sender channel definition at the local queue manager and a receiver channel definition at the remote queue manager. These two definition have the same name (limited to 20 characters), and together they constitute the definitions for one channel.

As each channel is unidirectional, if the application requires messages (including replies) to be returned from the remote queue manager, there must be another channel, defined to run in the opposite direction between the queue managers.

In WebSphere MQ, a channel is a definition of a transmission template that has two choices: send or receive. In WebSphere Application Server the term "channel" is used to define a communications pipe. The WebSphere MQ link is a user of channels: it is not itself a channel. The WebSphere MQ link serves as both the sender and the receiver channel, and you define their properties when you define the WebSphere MQ link.

Each WebSphere MQ queue manager normally has a dead-letter queue (also known as the undelivered message queue) defined for it. Messages are put on this queue if they cannot be delivered to their intended destination. In WebSphere Application Server service integration, the equivalent to dead-letter queues are exception destinations. A default exception destination is automatically created for each messaging engine. If messages cannot be delivered they will be put on a specific exception destination if one exists for the queue in question, or on the default exception destination.




Related concepts
Differences between service integration and a WebSphere MQ network
Concept topic    

Terms of Use | Feedback

Last updated: Aug 29, 2010 10:43:27 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=v602web&product=was-nd-mp&topic=cjc0011_
File name: cjc0011_.html