IBM Support

How to prevent JMS Listener Port from being shutdown after retry count is exhausted

Troubleshooting


Problem

systemOut.log reports: MDBListenerIm I WMSG0059E: Maximum restart retry count of 5 reached for listener Port MyCorrectMDBListener. Port is then closed.

Cause

If the Java Message Service (JMS) Listener Port Maximum retries property value exceeds the value of JMS Provider MQ Destination Queue Backout Threshold property value, then the port will NEVER be shut down.

Resolving The Problem


Changing the default behavior

The exact behavior of the JMS Server depends on three properties:

The listener port property Maximum retries.
This property defines the number of times the message listener service will attempt to deliver a message to an MDB before the listener port is stopped. The default value for this property is 0, which means that the listener port will shut itself down the first time a message cannot be delivered or an application rejects a message as being poisoned. The Maximum retries property can be changed from the Listener Port Settings panel in the IBM WebSphere Application Server administrative console.

The JMS message property Redelivery count.
The Redelivery count property indicates the number of times a message has tried to be delivered to an application. This property is incremental if a message could not be delivered, or if an application rejects the message after delivery (for example, by rolling back the transaction).

The JMS destination property Backout threshold.
The JMS Server that is installed as part of WebSphere Application Server allows users to define their own JMS destinations. Each destination defined in this way has the Backout threshold property fixed to the value 5. When a message has failed to be delivered a number of times equal to the Backout threshold property, the JMS Server will move the message to the default queue SYSTEM.DEAD.LETTER.QUEUE (this queue is a repository for messages that cannot be delivered, regardless of the reason).

The first thing the Embedded JMS Server does is return the message to the destination from where it came. At this point, the server will compare the Redelivery count of the message with the value of the Backout threshold property defined for the destination.

If the Redelivery count is less than the Backout threshold, the message is left on the queue. However, if the Redelivery count equals the Backout threshold, the message is moved off the queue and placed on the queue SYSTEM.DEAD.LETTER.QUEUE.

Where does the listener port's Maximum retries property fit in? As mentioned, this property specifies the maximum number of times that the listener tries to deliver a message to an MDB before the listener is stopped. The default value for this property is 0, which means that the first time a message cannot be delivered, the listener port is shut down, and the message is returned to the queue. At this point, the value of the Redelivery count property for the message is incremental.

When the listener port is restarted, it will attempt to deliver the message to the MDB again. If delivery fails or the message is rolled back again, the Redelivery count for the message will be incremental (giving it the value 2), and the listener port will be shut down.

This behavior will continue until a message either fails to be delivered or rolls back five times, at which point the message will be placed on the SYSTEM.DEAD.LETTER.QUEUE. The reason for this is that the message's Redelivery count equals the Backout threshold for the queue.

If the value of the Maximum retries property is set to 6 or more, the listener port will never shut itself down if it is unable to deliver a message to an MDB. When the listener port fails to deliver the same message for the fifth time, the Embedded JMS Server will place the message on the SYSTEM.DEAD.LETTER.QUEUE rather than the original queue, as the Redelivery count equals the value of the Backout threshold for the queue.

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Java Message Service (JMS)","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"8.0;7.0;6.1;6.0.2;6.0;5.1.1;5.1","Edition":"Edition Independent","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSNVBF","label":"Runtimes for Java Technology"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Java SDK","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21187992