0

在以下路线中,当我们遇到异常时,将忽略 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>
4

1 回答 1

0

因为你得到一个无限循环,听起来消息头CamelRedeliveryCounter每次都会被覆盖,因此它永远不会达到maximumRedeliveries2。

对发生错误的端点的调用是否有可能删除或重置消息头?特别是CamelRedeliveryCounter

于 2018-06-02T22:31:24.960 回答