Configuring publish exits

You must define certain attributes to configure a publish exit.

On Windows and Linux® you can use the IBM® MQ explorer to define the attributes. The attributes are defined on the queue manager properties page, under Publish/Subscribe.

To configure the publish exit in the qm.ini file on UNIX and Linux systems, create a stanza called PublishSubscribe. The PublishSubscribe stanza has the following attributes:
PublishExitPath= [path]|module_name
Module name and path containing the publish exit code. The maximum length of this field is MQ_EXIT_NAME_LENGTH. The default is no publish exit.
PublishExitFunction= function_name
Name of the function entry point into the module that contains the publish exit code. The maximum length of this field is MQ_EXIT_NAME_LENGTH.
[IBMi]On IBM i, if a program is used, omit PublishExitFunction.
PublishExitData= string
If the queue manager is calling a publish exit, it passes an MQPSXP structure as input. The data specified using the PublishExitData attribute is provided in the ExitData field of the structure. The string can be up to MQ_EXIT_DATA_LENGTH characters in length. The default is 32 blank characters.