Dead-letter queue handler sample
A sample dead-letter queue handler is provided, the name of the executable version is amqsdlq. If we want a dead-letter queue handler that is different from RUNMQDLQ, the source of the sample is available for you to use as your base.
The sample is similar to the dead-letter handler provided within the product but trace and error reporting are different. There are two environment variables available to you:
- ODQ_TRACE
- Set to YES or yes to switch tracing on
- ODQ_MSG
- Set to the name of the file containing error and information messages. The file provided is called amqsdlq.msg.
We need to make these variables known to the environment using either the export or set commands, depending on the platform; trace is turned off using the unset command.
We can modify the error message file, amqsdlq.msg, to suit your own requirements. The sample puts messages to stdout, not to the IBM MQ error log file.
The Administer or the System Management Guide for the platform explains how the dead-letter handler works, and how you run it.
Parent topic: Use the sample programs on Multiplatforms