How you use API exits

This section gives a brief overview of the tasks involved in setting up API exits.

 

How to configure WebSphere MQ for API exits

You configure WebSphere MQ to enable API exits by editing the configuration files, mqs.ini and qm.ini, and adding new stanzas that.

For detailed information on this configuration, see Configuring API exits. For a description of how API exits run, see What happens when an API exit runs?.

 

How to write an API exit

This section introduces writing API exits. For detailed information, aimed at application programmers, see the WebSphere MQ Application Programming Guide.

You write your exits using the C programming language. To help you do so, we provide a sample exit, amqsaxe0, that generates trace entries to a named file. When you start writing exits, we recommend that you use this as your starting point.

Exits are available for every API call, as follows. Within API exits, these calls take the general form:

MQ_call_EXIT (parameters, context, ApiCallParameters)

where

call is the API call name without the MQ suffix (PUT, GET, and so on),

parameters control the function of the exit, context describes the context in which the API exit was called, and ApiCallParameters represent the parameters to the MQI call,