Message exit
Message exits operate only on message channels and normally work in pairs. A message exit can operate on the whole message and make various changes to it.
Message exits at the sending and receiving ends of a channel normally work in pairs. A message exit at the sending end of a channel is called after the MCA has got a message from the transmission queue. At the receiving end of a channel, a message exit is called before the MCA puts a message on its destination queue.
A message exit has access to both the transmission queue header, MQXQH, which includes the embedded message descriptor, and the application data in a message. A message exit can modify the contents of the message and change its length. A change of length might be the result of compressing, decompressing, encrypting, or decrypting the message. It might also be the result of adding data to the message, or removing data from it.
Message exits can be used for any purpose that requires access to the whole message, rather than a portion of it, and not necessarily for security.
A message exit can determine that the message it is currently processing should not proceed any further towards its destination. The MCA then puts the message on the dead letter queue. A message exit can also close the channel.
Message exits can be called only on message channels, not on MQI channels. This is because the purpose of an MQI channel is to enable the input and output parameters of MQI calls to flow between the IBM MQ MQI client application and the queue manager.
The name of a message exit is specified as a parameter in the channel definition at each end of a channel. We can also specify a list of message exits to be run in succession.
For more information about message exits, see Link level security using a message exit.
Parent topic: Channel exit programs