Home

 

Error handling by the broker

Any message received by a broker that is not of Format MQFMT_RF_HEADER (or MQFMT_PCF in the case of the system management messages described in System programming) is treated as an error. It is written to the dead-letter queue (or discarded, depending on the report options), and an exception report generated, if requested. If a message is of the correct format but has some other error (for example, a syntax error), or if the broker cannot process it correctly (for example, it cannot retain a message), the following happens:

If an input message is put to the dead-letter queue, no response and publication messages are sent. It might be appropriate for the input message to be restored and reprocessed when the error has been resolved.

If the message is a Publish command message, and there is a problem sending an outgoing message on to a subscriber, the processing is as follows:

Note:
If the broker cannot put a publication message onto a destination queue or the dead-letter queue, and cannot discard the message, the broker continues trying to put the publication message onto the destination queue (at suitable intervals) and does not continue processing subsequent messages.

The dead-letter queue and discard options for nonpersistent messages are specified in queue manager configuration file (qm.ini or equivalent). These options are described in Set up a broker.



 

Home