The sample DLQ handler amqsdlq
In addition to the dead-letter queue handler invoked using the runmqdlq command, IBM® MQ provides the source of a sample DLQ handler amqsdlq with a function that is similar to that provided by runmqdlq.
You can customize amqsdlq to provide a DLQ handler that meets your requirements. For example, you might decide that you want a DLQ handler that can process messages without dead-letter headers. (Both the default DLQ handler and the sample, amqsdlq, process only those messages on the DLQ that begin with a dead-letter header, MQDLH. Messages that do not begin with an MQDLH are identified as being in error, and remain on the DLQ indefinitely.)
MQ_INSTALLATION_PATH represents the high-level directory in which IBM MQ is installed.
In IBM MQ for UNIX and Linux® systems, the source of amqsdlq is supplied in the directory:
and the compiled version is supplied in the directory:
You can also compile amqsdlq in client mode. For more information, see Writing client procedural applications, Building applications for IBM MQ MQI clients, and Running applications in the IBM MQ MQI client environment.