WebSphere自由是JmsServer Dead Letter队列

时间:2017-09-28 21:21:16

标签: websphere websphere-liberty spring-jms open-liberty

有人能指点我使用Liberty嵌入式JMS消息提供程序在WLS自由配置文件版本16.0.0.2上设置DLQ吗? 我有一个配置了spring jms监听器的队列,当消息监听器抛出RuntimeException时,该消息应该在几次重试后进入处理字母队列。

感谢。

1 个答案:

答案 0 :(得分:5)

使用wasJmsServer功能,该术语是异常目的地。这可以配置为队列对象上的属性。这引用了另一个队列的名称。举个例子:

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

异常目的地的默认名称是_SYSTEM.Exception.Destination,所以如果你有这个:

<messagingEngine>
    <queue id="_SYSTEM.Exception.Destination" />
    <queue id="myQueue" />
</messagingEngine>
那么你应该得到所有的“坏”&#39;默认队列中的消息。默认情况下,如果传递失败5次,则只会将消息发送到例外目标。可以使用maxRedeliveryCount设置覆盖此内容:

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

Knowledge Center for WebSphere Liberty

中提供了此配置
相关问题