You can use send and receive exits to transform the data before transmission. Channel send exit programs can add their own data about the transformation by reserving space in the transmission buffer. This data is processed by the receive exit program and then removed from the buffer. For example, you might want to encrypt the data and add a security key for decryption.
When the send exit program is called for initialization, set the ExitSpace field of MQXCP to the number of bytes to be reserved. See MQCXP - Channel exit parameter for details. ExitSpace can be set only during initialization, that is when ExitReason has the value MQXR_INIT. When the send exit is invoked immediately before transmission, with ExitReason set to MQXR_XMIT, ExitSpace bytes are reserved in the transmission buffer. ExitSpace is not supported on z/OS.
The send exit need not use all of the reserved space. It can use less than ExitSpace bytes or, if the transmission buffer is not full, the exit can use more than the amount reserved. When setting the value of ExitSpace, you must leave at least 1 KB for message data in the transmission buffer. Note that channel performance can be affected if reserved space is used for large amounts of data.
Channel receive exit programs must be set up to be compatible with the corresponding send exits. Receive exits must know the number of bytes in the reserved space and must remove the data in that space.
You can specify a list of send and receive exit programs to be run in succession. WebSphere MQ maintains a total for the space reserved by all of the send exits. This total space must leave at least 1 KB for message data in the transmission buffer.
The following example shows how space is allocated for three send exits, called in succession:
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
csqzae10297 |