作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在实现未发送消息处理,但存在问题。死信策略可以在配置文件的服务器端设置(通过队列名称模式),但是我的消息队列是动态创建的,它们的名称在配置阶段是未知的。所以我想知道是否可以从客户端设置死信策略?
最佳答案
这可能不是您想要的,但根据this ,你应该能够在你的配置中使用通配符 >
和 IndividualDeadLetterStrategy
这样你的每个队列都有自己的 DLQ。看这部分:
You can apply this strategy using wild card if you like so that all queues get their own dead-letter queue, as is shown in the example below.
<broker...>
<destinationPolicy>
<policyMap>
<policyEntries>
<!-- Set the following policy on all queues using the '>' wildcard -->
<policyEntry queue=">">
<deadLetterStrategy>
<!--
Use the prefix 'DLQ.' for the destination name, and make
the DLQ a queue rather than a topic
-->
<individualDeadLetterStrategy
queuePrefix="DLQ." useQueueForQueueMessages="true" />
关于java - ActiveMQ:如何在客户端设置死信策略?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13509898/
我正在创建一个死信 channel 错误处理程序,如下所示 errorHandler(deadLetterChannel("direct:myDLC").useOriginalMessage().ma
以下是我的 Camel 路线代码 .errorHandler(deadLetterChannel("jmstx:queue:ErrorHandler") .useOriginalMessage()
我正在尝试跨不同的集群系统进行分布式发布-订阅,但无论我尝试什么,它都不起作用。 我想做的就是创建一个简单的示例。 1)我创建一个主题,说“内容”。 2) 假设 jvm A 中的一个节点创建主题、订阅
我是一名优秀的程序员,十分优秀!