WebSphere liberty wasJmsServer 死信队列

WebSphere liberty wasJmsServer Dead Letter queue

任何人都可以指出一些关于使用 Liberty 嵌入式 JMS 消息传递提供程序在 WLS 自由配置文件版本 16.0.0.2 上设置 DLQ 的参考资料吗? 我有一个配置了 spring jms 侦听器的队列,当消息侦听器抛出 RuntimeException 时,消息应该在几次重试后进入交易信队列。

谢谢。

对于 wasJmsServer 功能,术语是异常目标。这可以配置为队列对象的属性。这引用了另一个队列的名称。例如:

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

异常目标的默认名称是 _SYSTEM.Exception.Destination,因此如果您有此名称:

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

那么您应该将所有 'bad' 消息都放在默认队列中。默认情况下,如果传递失败 5 次,消息只会发送到异常目的地。这可以用 maxRedeliveryCount 设置覆盖:

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

此配置在 Knowledge Center for WebSphere Liberty 中可用。