Defining the channels
To send messages from one queue manager to another, you must define two channels. You must define one channel on the source queue manager and one channel 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:
- The name of the transmission queue to be used (the XMITQ attribute).
- The connection name of the partner system (the CONNAME attribute).
- The name of the communication protocol you are using (the TRPTYPE attribute). On IBM MQ for z/OSĀ®, the protocol must be TCP or LU6.2. On other platforms, we do not have to specify this. We can leave it to pick up the value from your default channel definition.
Details of all the channel attributes are given in 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). On IBM MQ for z/OS, the protocol must be TCP or LU6.2. On other platforms, we do not have to specify this. We can leave it to pick up the value from your default channel definition.
Receiver channel definitions can be generic. This means that if we 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 applies to them all.
When we have defined the channel, we 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.
Note: The value of the TRPTYPE parameter is ignored by the responding message channel agent. For example, a TRPTYPE of TCP on the sender channel definition successfully starts with a TRPTYPE of LU62 on the receiver channel definition as a partner.