Recovering from error conditions in the ASF
If a ConnectionConsumer experiences a serious error, message delivery to all ConnectionConsumers with an interest in the same QLOCAL stops. When this occurs, any ExceptionListener that is registered with the affected Connection is notified. There are two ways in which an application can recover from these error conditions.
Typically, a serious error of this nature occurs if the ConnectionConsumer cannot requeue a message to the dead-letter queue, or it experiences an error when reading messages from the QLOCAL.
Because any ExceptionListener that is registered with the affected Connection is notified, we can use them to identify the cause of the problem. In some cases, the system administrator must intervene to resolve the problem.
Use one of the following techniques to recover from these error conditions:- Call close() on all affected ConnectionConsumers. The application can create new ConnectionConsumers only after all affected ConnectionConsumers are closed and any system problems are resolved.
- Call stop() on all affected Connections. After all Connections are stopped and any system problems are resolved, the application can start() its Connections successfully.
Parent topic: Error handling