camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fordm <ford.j.mar...@gmail.com>
Subject Re: Rethrowing an exception using the Dead Letter Error Handler
Date Wed, 24 Jul 2013 12:53:08 GMT
Isn't it always the way. I've found the answer:

<camelContext>
    <errorHandler deadLetterUri="myDLQ" type="DeadLetterChannel"
id="myDLErrorHandler">
        <redeliveryPolicy maximumRedeliveries="3" />
    </errorHandler>

    <route errorHandlerRef="myDLErrorHandler">
        <from uri="activemq:myFromQueue" />

        <onException>
           
<exception>org.apache.openjpa.persistence.PersistenceException</exception>
            <redeliveryPolicy maximumRedeliveries="2" />
            <handled>
                <constant>true</constant>
            </handled>
            <to uri="myDLQ" />
            <throwException ref="mySpecialException" />
        </onException>

        <to uri="jpa://foo" />
    </route>
</camelContext>

Who knows what I was trying to do before!



--
View this message in context: http://camel.465427.n5.nabble.com/Rethrowing-an-exception-using-the-Dead-Letter-Error-Handler-tp5736211p5736213.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message