Channel-exit programs

If you want to do some additional processing (for example, encryption or data compression) you can write your own channel-exit programs, or sometimes use SupportPacs. The Transaction Processing SupportPacs library for WebSphere MQ is available on the Internet at URL:

WebSphere MQ calls channel-exit programs at defined places in the processing carried out by the MCA. There are six types of channel exit:

Security exit
Used for security checking, such as authentication of the partner.
Message exit
Used for operations on the message, for example, encryption prior to transmission.
Send and receive exits
Used for operations on split messages, for example, data compression and decompression.
Message-retry exit
Used when there is a problem putting the message to the destination.
Channel auto-definition exit
Used to modify the supplied default definition for an automatically defined receiver or server-connection channel.

The sequence of processing is as follows:

  1. The security exits are called after the initial data negotiation between both ends of the channel. These must end successfully for the startup phase to complete and to allow messages to be transferred.
  2. The message exit is called by the sending MCA, and then the send exit is called for each part of the message that is transmitted to the receiving MCA.
  3. The receiving MCA calls the receive exit when it receives each part of the message, and then calls the message exit when the whole message has been received.

This is illustrated in Figure 10.

Figure 10. Sequence in which channel exit programs are called
The figure shows the sequence in which channel--exit programs are called. After initial data negotiation, the MCAs call the security exits. If these are successful, the startup phase can complete, and message transfer can take place. The sending MCA calls the message exit, and the send exit is called for each part of the message to be transmitted. The receiving MCA can then call the receive exit. If transmission is unsuccessful, the receiving MCA calls the message-retry exit.

The message-retry exit is used to determine how many times the receiving MCA will attempt to put a message to the destination queue before taking alternative action.

For more information about channel exits, see Channel-exit programs.