Hi Yes removeOnFailure will be called even if the exception was handled.
On Mon, Sep 8, 2014 at 5:16 PM, Chris Melikian <ch...@melikian.net> wrote: > Hi, > > So i'm using Camel 2.13.1 and the JDBC Idempotent Repository and I'd like to > use the removeOnFailure > =true option to be able to replay the transaction on failure. > > My question is whether implementing an onException clause which handles an > exception would stop the removeOnFailure option from being carried out as > the failure is being marked as 'handled=true'. Here is my onException clause > in Spring XML:- > > <camel:onException> > <camel:exception>java.lang.Exception</camel:exception> > <camel:redeliveryPolicy logStackTrace="true" > disableRedelivery="true" logExhausted="true" > /> > <camel:handled> > <constant>true</constant> > </camel:handled> > <camel:log > message="Transaction has failed and is being > handled by the exception > handler. Received message [${exception}], full stack trace > [${exception.stacktrace}]" > loggingLevel="ERROR" > logName="com.lgim.sophis.unrecoverableerror"></camel:log> > </camel:onException> > > In the above case would the camel_messageprocessed table entry for the > failing exchange be removed? > > Here is my route for idempotency:- > > <route id="idempotentTransactionsRoute"> > <from uri="direct:filterForIdempotency" /> > <idempotentConsumer > messageIdRepositoryRef="jdbcIdempotentRepository"> > <el>${in.body.ID}</el> > <to ref="direct:processTransaction" /> > </idempotentConsumer> > <stop /> > </route> > > Any help appreciated! > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Idempotent-consumer-removeOnFailure-true-and-exception-handling-tp5756198.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/