Exception in the DeadLetterChannel declared at CamelContext leads StackOverFlow

Solution Verified - Updated -

Issue

The exception in the DeadLetterChannel leads StackOverFlow.

<camelContext errorHandlerRef="myErrorHandler" id="_context1" xmlns="http://camel.apache.org/schema/blueprint">
        <errorHandler deadLetterUri="direct:MyDeadLetterChannel"
            id="myErrorHandler" type="DeadLetterChannel"/>
        <route id="_route1">
            <from id="_from1" uri="timer:timerName?repeatCount=1"/>
            <throwException exceptionType="java.lang.Exception"
                id="_throwException1" message="throw Exception from _route1"/>
        </route>
        <route id="myDeadLetterChannelRoute">
            <from id="fromMyDeadLetterChannel" uri="direct:MyDeadLetterChannel"/>
            <throwException exceptionType="java.lang.Exception"
                id="_throwException2" message="throw Exception from myDeadLetterChannelRoute"/>
        </route>
    </camelContext>

It seems like there is a call cycle here:

    at org.apache.camel.processor.FatalFallbackErrorHandler$1.done(FatalFallbackErrorHandler.java:84)
    at org.apache.camel.processor.SendProcessor$1.done(SendProcessor.java:155)
    at org.apache.camel.processor.CamelInternalProcessor$InternalCallback.done(CamelInternalProcessor.java:256)
    at org.apache.camel.processor.CamelInternalProcessor$InternalCallback.done(CamelInternalProcessor.java:256)
    at org.apache.camel.processor.RedeliveryErrorHandler$2.done(RedeliveryErrorHandler.java:975)
    at org.apache.camel.processor.FatalFallbackErrorHandler$1.done(FatalFallbackErrorHandler.java:84)
    at org.apache.camel.processor.SendProcessor$1.done(SendProcessor.java:155)
    at org.apache.camel.processor.CamelInternalProcessor$InternalCallback.done(CamelInternalProcessor.java:256)
    at org.apache.camel.processor.CamelInternalProcessor$InternalCallback.done(CamelInternalProcessor.java:256)
    at org.apache.camel.processor.RedeliveryErrorHandler$2.done(RedeliveryErrorHandler.java:975)
    at org.apache.camel.processor.FatalFallbackErrorHandler$1.done(FatalFallbackErrorHandler.java:84)

Environment

  • Red Hat Fuse
    • 6.x
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content