Recovering from error conditions
If a ConnectionConsumer experiences a serious error, message delivery to all ConnectionConsumers with an interest in the same QLOCAL stops. Typically, this occurs if the ConnectionConsumer cannot requeue a message to the dead-letter queue, or it experiences an error when reading messages from the QLOCAL.
When this occurs, any ExceptionListener that is registered with the affected Connection is notified.
We can use these to identify the cause of the problem. In some cases, the system administrator must intervene to resolve the problem.
There are two ways in which an application can 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. Once all Connections are stopped and any system problems are resolved, the application should be able to start() all Connections successfully.
uj25620_