【发布时间】:2016-02-11 16:02:31
【问题描述】:
有如下骆驼路线。
@Override
public void configure() throws Exception {
onException(java.lang.Exception.class).useOriginalMessage()
.beanRef("discoveryService", "updateConnection")
.redeliveryPolicyRef("redeliverMessagePolicy");
from(ENDPOINT_URI).to(queueName);
}
在 xml 中定义如下重新交付策略-
<redeliveryPolicyProfile id="redeliverMessagePolicy"
retryAttemptedLogLevel="WARN" maximumRedeliveries="8"
redeliveryDelay="${redeliveryDelay}" />
但是,当抛出异常时,会在 OnException 块执行之前进行重新传递尝试(一些配置属性在 onException 块中更新。在 OneException 内的 DiscoveryService 中有一个调试点,在重新传递尝试完成后调用它) .因此,当前消息会丢失而不会重新传递。不知道为什么会这样。 使用 activemq-camel 版本 5.8.0 谢谢
【问题讨论】:
标签: java apache-camel activemq