Search code examples
jakarta-eeibm-mqwebsphere-8ibm-was

How to prevent Java MDB from pausing on errors on IBM Websphere WAS 8.5?


After throwing an exception, the MQ message endpoint of our Java MDB application is being paused with the message

CWWMQ0007W: The message endpoint <APP> has been paused by the system.  Message delivery failed to the endpoint more than <N> times.

I understand that this is per Application Specification and that this behavior is reasonable for many applications.

In our case, we would like the MQ message causing the exception to be consumed from the queue and the application remaining running, ie. processing the next messages.

Is there any way to achieve this way other than by catching any Throwable in the MDB onMessage method?


Solution

  • Read this article How WebSphere Application Server V8.x handles poison messages, it has various scenarios described.

    If you want to just continue processing without stopping endpoint, then either uncheck the Stop endpoint if message delivery fails or set Number of sequential delivery failures before suspending endpoint to some higher value in the activation specification configuration. You also have to configure Backout threshold (BOTHRESH) property in the WebSphere MQ.

    In this way exception message will be put to DEAD.LETTER.QUEUE by MQ and will allow you to process next messages.