Hi You should configure the 2nd route to also use the DL error handler.
On Thu, Apr 18, 2013 at 2:38 PM, aram <antonra...@gmail.com> wrote: > Hello.I have some problem with using DeadLetterChannel. Here is an example of > routes that shows the issue: > > // configured error handler > <camel:errorHandler id="testErrorHandler" type="DeadLetterChannel" > useOriginalMessage="true" > deadLetterUri="jms:dlq?preserveMessageQos=true"> > <camel:redeliveryPolicy logHandled="true" logStackTrace="true" > retriesExhaustedLogLevel="WARN" logExhausted="true"/> > </camel:errorHandler> > > //producer route > <route id="receiveFromJms" errorHandlerRef="testErrorHandler"> > <from > uri="jms:testJms?transactionManager=#platformTransactionManager"/> > <to uri="direct:sent" inheritErrorHandler="true"/> > </route> > > //consuming route with exception > <route id="receiveFromDirect"> > <from uri="direct:sent"/> > <onException> > <exception>java.io.IOException</exception> > <redeliveryPolicy maximumRedeliveries="3" > redeliveryDelay="100" /> > <continued> > <constant>false</constant> > </continued> > </onException> > > <throwException ref="java.io.IOException"/> > <to uri="log:finishTest"/> > </route> > > I expect that by throwing an exception, the route will make redelivery > message 3 times, then send it to the specified deadLetterUri. But in fact it > turns out that the route make redelivery infinitely because of jms > transaction redelivery, and dont send it to the deadLetterUri. If i remove > onException it works fine , but without redelivery. Is it a bug or wrong > configuration ? > redeliveryTest.zip > <http://camel.465427.n5.nabble.com/file/n5731073/redeliveryTest.zip> > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/DeadLetterChanel-does-not-handle-exception-tp5731073.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen