2

Could anyone point me to some reference on setting up DLQ on WLS liberty profile version 16.0.0.2 using Liberty embedded JMS messaging provider? I have a queue configured with a spring jms listener and when the message listener throws a RuntimeException, the message should go to deal letter queue after few retries.

Thanks.

Alasdair
  • 3,071
  • 15
  • 20
nkare
  • 397
  • 6
  • 17
  • You didn't mention which JMS provider you're using. Is it the [Liberty embedded JMS messaging provider](https://www.ibm.com/support/knowledgecenter/en/SSAW57_liberty/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/cwlp_msg_embedded.html)? – Scott Kurz Sep 28 '17 at 21:34
  • That is correct. Ill update the question. Thanks – nkare Sep 28 '17 at 21:46

1 Answers1

5

With the wasJmsServer feature the term is the exception destination. This can be configured as an attribute on the queue object. This references the name of another queue. As an example:

<messagingEngine>
    <queue id="dlq" />
    <queue id="myQueue" exceptionDestination="dlq" />
</messagingEngine>

there is a default name for exception destination which is _SYSTEM.Exception.Destination, so if you have this:

<messagingEngine>
    <queue id="_SYSTEM.Exception.Destination" />
    <queue id="myQueue" />
</messagingEngine>

then you should have all the 'bad' messages on the default queue. By default messages will only be sent to the exception destination if delivery failed 5 times. This can be overridden with the maxRedeliveryCount setting:

<messagingEngine>
    <queue id="_SYSTEM.Exception.Destination" />
    <queue id="myQueue" maxRedeliveryCount="2"/>
</messagingEngine>

The configuration for this is available in the Knowledge Center for WebSphere Liberty.

Alasdair
  • 3,071
  • 15
  • 20