ApiExitLocal stanza of the qm.ini file
The ApiExitLocal stanza specifies API exit routines for a queue manager.
For a server, modify the ApiExitLocal stanza of the qm.ini file to identify API exit routines for a queue manager.
Alternatively, on Linux®
(x86 and x86-64) and Windows, use the IBM® MQ Explorer
Exits
queue manager properties page.
For a client, modify the ApiExitLocal stanza in the mqclient.ini file to identify API exit routines for a queue manager.
Overview
ApiExitLocal
stanza allows only a single Module
to be
specified, and yet four modules need to be provided, as follows:- 32 bit unthreaded
- 32 bit threaded
- 64 bit unthreaded
- 64 bit threaded
Note that IBM MQ appends _r
to the
supplied module name to identify the threaded version of the exit, but IBM MQ does not provide a directly equivalent mechanism for the 32
bit and 64 bit variants.
The versions of amqsaxe0
and amqsaxe0_r
that are shipped in
prefix/mqm/samp/bin are built for the native size of the
queue manager on the platform for which they are built (now all 64 bit) and can only be used by
applications running in the same native size.
If an unqualified module name is provided, IBM MQ looks in /var/mqm/exits for the 32 bit variants and in /var/mqm/exits64 for the 64 bit variants
module=amqsaxe
implies:
/var/mqm/exits/amqsaxe - 32 bit unthreaded variant
/var/mqm/exits/amqsaxe_r - 32 bit threaded variant
/var/mqm/exits64/amqsaxe - 64 bit unthreaded variant
/var/mqm/exits64/amqsaxe_r - 64 bit threaded variant
On Windows systems, you can also use the amqmdain command to change the entries for API exits. (To identify API exit routines for all queue managers, you use the ApiExitCommon and ApiExitTemplate stanzas, as described in ApiExitCommon and ApiExitTemplate stanzas of the mqs.ini file.)
Note, that for the API exit to work correctly, the message from the server must be sent to the client unconverted. After the API exit has processed the message, the message must then be converted on the client. This, therefore, requires that you have installed all conversion exits on the client.
For more information about using these attributes, see Configuring API exits.
Parameters
- Name=ApiExit_name
- The descriptive name of the API exit passed to it in the ExitInfoName field of the MQAXP structure.
- Function=function_name
- The name of the function entry point into the module containing the API exit code. This entry point is the MQ_INIT_EXIT function.
- Module=module_name
- The module containing the API exit code.
- Data=data_name
- Data to be passed to the API exit in the ExitData field of the MQAXP structure.
- Sequence=sequence_number
- The sequence in which this API exit is called relative to other API exits. An exit with a low sequence number is called before an exit with a higher sequence number. There is no need for the sequence numbering of exits to be contiguous. A sequence of 1, 2, 3 has the same result as a sequence of 7, 42, 1096. If two exits have the same sequence number, the queue manager decides which one to call first. You can tell which was called after the event by putting the time or a marker in ExitChainArea indicated by the ExitChainAreaPtr in MQAXP or by writing your own log file.
Example stanza
ApiExitLocal:
Name=ClientApplicationAPIchecker
Sequence=3
Function=EntryPoint
Module=/usr/Dev/ClientAppChecker
Data=9.20.176.20