I've recently fixed this... https://issues.apache.org/activemq/browse/CAMEL-662
so you can now specify an errorHandlerRef on a <camelContext> a <route> or <pipeline> element to refer to a spring bean which could be a DeadLetterChannelBuilder or a TransactionalErrorHandlerBuilder etc. i.e. you can define the errror handler as a normal spring bean now 2008/3/7 Marc Giger <[EMAIL PROTECTED]>: > Hi, > > I'm trying to configure the DeadLetterChannel with spring. > Unfortunately without success. No matter where I declare the > <onException>, camel tries to redeliver the message 5 times in the case > of an exception. > > How must the following configuration be modified so that camel just > tries to deliver once? > > <camelContext id="camel" > xmlns="http://activemq.apache.org/camel/schema/spring"> > <route> > <from uri="cxf:bean:routerEndpoint"/> > <onException> <!-- no effect --> > <redeliveryPolicy> > <maximumRedeliveries>0</maximumRedeliveries> > </redeliveryPolicy> > </onException> > <process ref="decryptProcessor"> > <onException> <!-- no effect --> > <redeliveryPolicy> > <maximumRedeliveries>0</maximumRedeliveries> > </redeliveryPolicy> > </onException> > </process> > <choice> > <when> > <methodCall bean="endpointSelector" > method="matches"/> <to > uri="cxf:bean:serviceEndpoint?dataFormat=MESSAGE"/> </when> > <otherwise> > <to > uri="cxf:bean:localEndpoint"/> </otherwise> > </choice> > </route> > </camelContext> > > Thanks a lot! > > Cheers, > > Marc > -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://open.iona.com
