How to send a message to another queue manager

This section describes the simplest way to send a message from one queue manager to another.

Before you do this you need to do the following:

  1. Check that your chosen communication protocol is available.
  2. Start the queue managers.
  3. Start the channel initiators.
  4. Start the listeners.

You also need to have the correct WebSphere MQ security authorization to create the objects required.

To send messages from one queue manager to another:

You can use several different methods to define these objects, depending on your WebSphere MQ platform:

z/OS or MVS/ESA(TM)
If you are using z/OS native distributed queuing, you can use the Operation and Control panels (see the WebSphere MQ System Administration Guide for more information) WebSphere MQ script commands (MQSC). See the WebSphere MQ Script (MQSC) Command Reference for more information. If you are using z/OS distributed queuing with CICS, you must use the supplied CICS transaction CKMC for channels.

iSeries
You can use the panel interface, the WebSphere MQ script commands described in the WebSphere MQ Script (MQSC) Command Reference book, or the programmable command format (PCF) commands described in the WebSphere MQ Programmable Command Formats and Administration Interface book.

OS/2, Windows systems, UNIX systems, and Compaq OpenVMS Alpha
You can use the WebSphere MQ commands described in the WebSphere MQ Script (MQSC) Command Reference book, or the PCF commands described in the WebSphere MQ Programmable Command Formats and Administration Interface book. On Windows systems only, you can also use the graphical user interfaces, the WebSphere MQ explorer and the WebSphere MQ Web Administration.

Compaq NonStop Kernel
You can use MQSC commands, PCF commands, or the Message Queue Management facility. See the MQSeries for Compaq NonStop Kernel System Administration for more information about the control commands and the Message Queue Management facility.

VSE/ESA
You can use the panel interface as described in the MQSeries for VSE/ESA System Management Guide.

The different methods are described in more detail in the platform-specific parts of this book.

Defining the channels

To send messages from one queue manager to another, you need to define two channels; one on the source queue manager and one on the target queue manager.

On the source queue manager
Define a channel with a channel type of SENDER. You need to specify the following:

Details of all the channel attributes are given in Chapter 6, Channel attributes.

On the target queue manager
Define a channel with a channel type of RECEIVER, and the same name as the sender channel.

Specify the name of the communication protocol you are using (the TRPTYPE attribute). For WebSphere MQ for AIX, iSeries, HP-UX, Solaris and Windows systems, and MQSeries for Compaq Tru64 UNIX, and OS/2 Warp, you do not have to specify this. You can leave it to pick up the value from your default channel definition. If you are using CICS to define a channel, you cannot specify TRPTYPE. Instead you should accept the defaults provided. On MQSeries for VSE/ESA, you can choose T (TCP) or L (LU 6.2) on the Maintain Channel Definition menu. On WebSphere MQ for z/OS, the protocol must be TCP or LU6.2.

Note that receiver channel definitions can be generic. This means that if you have several queue managers communicating with the same receiver, the sending channels can all specify the same name for the receiver, and one receiver definition will apply to them all.

When you have defined the channel, you can test it using the PING CHANNEL command. This command sends a special message from the sender channel to the receiver channel and checks that it is returned.

Defining the queues

To send messages from one queue manager to another, you need to define up to six queues; four on the source queue manager and two on the target queue manager.

On the source queue manager

On the target queue manager

Sending the messages

When you put messages on the remote queue defined at the source queue manager, they are stored on the transmission queue until the channel is started. When the channel has been started, the messages are delivered to the target queue on the remote queue manager.

Starting the channel

Start the channel on the sending queue manager using the START CHANNEL command. When you start the sending channel, the receiving channel is started automatically (by the listener) and the messages are sent to the target queue. Both ends of the message channel must be running for messages to be transferred.

Because the two ends of the channel are on different queue managers, they could have been defined with different attributes. To resolve any differences, there is an initial data negotiation between the two ends when the channel starts. In general, the two ends of the channel agree to operate with the attributes needing the fewer resources, thus enabling larger systems to accommodate the lesser resources of smaller systems at the other end of the message channel.

The sending MCA splits large messages before sending them across the channel. They are reassembled at the remote queue manager. This is transparent to the user.

An MCA can transfer messages using multiple threads. This process, called pipelining enables the MCA to transfer messages more efficiently, with fewer wait states. This improves channel performance.



© IBM Corporation 2002. All Rights Reserved