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.

We can customize amqsdlq to provide a DLQ handler that meets we requirements. For example, you might decide that we 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 Windows, the source of amqsdlq is supplied in the directory:
MQ_INSTALLATION_PATH\tools\c\samples\dlq
and the compiled version is supplied in the directory:
MQ_INSTALLATION_PATH\tools\c\samples\bin

In IBM MQ for UNIX and Linux systems, the source of amqsdlq is supplied in the directory:

MQ_INSTALLATION_PATH/samp/dlq

and the compiled version is supplied in the directory:

MQ_INSTALLATION_PATH/samp/bin

Parent topic: Invoking the DLQ handler