在以下路线中,当我们遇到异常时,将忽略 redeliveryPolicy 中的 maximumRedeliveries 子句。我们得到:
(MessageId: ID-UW205584-58231-1527668174534-39-248 on ExchangeId: ID-UW205584-58231-1527668174534-39-24) 传递失败。交付尝试:0
(MessageId: ID-UW205584-58231-1527668174534-39-248 on ExchangeId: ID-UW205584-58231-1527668174534-39-24) 传递失败。交付尝试:1
然后它保持在无限循环中,重复最后一次重试。任何想法?非常感谢社区!
我们的路线如下所示:
<?xml version="1.0" encoding="ASCII"?>
<routes xmlns="http://camel.apache.org/schema/spring">
<route handleFault="true">
<from uri="switchyard://ProcessTaskEx"/>
<log message="ProcessTaskEx - message received: ${body}" loggingLevel="DEBUG" logName="WebServiceQueues" />
<to uri="switchyard://RequestCapacity"/>
<onException>
<exception>java.lang.Exception</exception>
<exception>webservicequeues.utilities.WebServiceQueueException</exception>
<redeliveryPolicy maximumRedeliveries="2" redeliveryDelay="6000" maximumRedeliveryDelay="90000" retriesExhaustedLogLevel="INFO" retryAttemptedLogLevel="INFO"/>
<handled>
<constant>true</constant>
</handled>
<log message="Failed after Retry.Sending ProcessTask Request to Error Queue" loggingLevel="ERROR" logName="WebServiceQueues" />
<to uri="switchyard://ErrorProcessTaskExQueue"/>
</onException>
</route>
</routes>