SharedDeadLetterStrategy 不会丢弃 DLQ 消息

发布于 2024-12-19 01:22:21 字数 984 浏览 2 评论 0原文

我正在使用 AMQ 5.5。我想禁用向 ActiveMQ.DLQ 目的地发送死信的选项,并完全丢弃(自动)否则将发送到那里的消息。为此,我对代理进行了如下配置:

<amq:destinationPolicy>
        <amq:policyMap>
          <amq:policyEntries>
            <amq:policyEntry topic=">" producerFlowControl="false" >
                <amq:deadLetterStrategy>
                      <amq:sharedDeadLetterStrategy processExpired="false" />
                </amq:deadLetterStrategy>
            </amq:policyEntry>
            <amq:policyEntry queue=">" producerFlowControl="false">
                <amq:deadLetterStrategy>
                      <amq:sharedDeadLetterStrategy processExpired="false" />
                </amq:deadLetterStrategy>
            </amq:policyEntry>

          </amq:policyEntries>
        </amq:policyMap>
    </amq:destinationPolicy>

但是,我仍然看到消息存储在 DLQ 中。您能让我知道是什么原因造成的吗? 我需要修复配置中的任何内容吗?

谢谢哈里

Am using AMQ 5.5. I would like to disable the option of sending dead letters to ActiveMQ.DLQ destination and completely discard (automatically) the messages that would be sent there otherwise. To do this I had configured the broker as below:

<amq:destinationPolicy>
        <amq:policyMap>
          <amq:policyEntries>
            <amq:policyEntry topic=">" producerFlowControl="false" >
                <amq:deadLetterStrategy>
                      <amq:sharedDeadLetterStrategy processExpired="false" />
                </amq:deadLetterStrategy>
            </amq:policyEntry>
            <amq:policyEntry queue=">" producerFlowControl="false">
                <amq:deadLetterStrategy>
                      <amq:sharedDeadLetterStrategy processExpired="false" />
                </amq:deadLetterStrategy>
            </amq:policyEntry>

          </amq:policyEntries>
        </amq:policyMap>
    </amq:destinationPolicy>

However, I still see that the messages are getting stored in DLQ. Can you please let me know what could be causing this?
Do I need to fix anything in the config?

Thanks

Hari

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

圈圈圆圆圈圈 2024-12-26 01:22:21

这里面临的问题是,上面给出的配置只会丢弃非持久性过期消息。要丢弃所有过期消息(持久性消息和非持久性消息),请使用discardingDLQBrokerPlugin。

The problem faced here was that, the above given configuration would discard only non-persistent expired messages. To discard all expired messages, persistent and non-persistent, use discardingDLQBrokerPlugin.

<amq:plugins>

<amq:discardingDLQBrokerPlugin dropAll="true"/>

</amq:plugins>

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文