Hi Please us the user forum / @user mailing list for these kind of questions.
On Tue, Feb 23, 2016 at 3:54 AM, Venugopal Iyengar <[email protected]> wrote: > I have the following syntax that I am using to restrict number of > redeliveries in ase of an exception. For some reason it is ignoring this > parameter, however redeliveryDelay seems to be working. Here is the snippet > of the configuration that I am using > > <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> > > <errorHandler id="eh" redeliveryPolicyRef="myPolicy"/> > > <!-- and the redelivery policy is a profile where we can configure it > --> > <redeliveryPolicyProfile id="myPolicy" maximumRedeliveries="3" > redeliveryDelay="5000" /> > <route errorHandlerRef="eh"> > <from uri="file:C:\temp\sample" /> > <split streaming="true" parallelProcessing="true"> > <tokenize token="\n" group="1" /> > <unmarshal> > <csv delimiter="|" /> > </unmarshal> > <to uri="bean:exampleProcessor" /> > <to > uri="velocity:velocity/to-exampleRecord.vm?contentCache=false?propertiesFile=velocity/velocity.properties" > /> > <to > > uri="my-rest-server://{{Username}}:{{Password}}@{{Host}}:{{Port}}?format=xml&" > /> > </split> > </route> > </camelContext> > > I am getting java.lang.IndexOutOfBoundsException and the camel still trying > to process the file after the maximumRdeliveries of 3. It is just ignoring > this parameter which is specified as part of the policy. > > Please help me to understand, what I am doing wrong? > Here is the exception > > [Camel (camel) thread #4 - file://C:%5CUsers%5Cviyengar%5Ctemp%5Ckms%5Crec] > GenericFileOnCompletion WARN Rollback file strategy: > org.apache.camel.component. > file.strategy.GenericFileRenameProcessStrategy@1a8a582d for file: > GenericFile[C:\temp\sample\sample-1.csv] > > java.lang.IndexOutOfBoundsException: Index: 24, Size: 24 > at java.util.ArrayList.rangeCheck(ArrayList.java:653) > at java.util.ArrayList.get(ArrayList.java:429) > at > com.example.camel.processor.ExampleProcessor.processCsv(ExampleProcessor.java:80) > at sun.reflect.GeneratedMethodAccessor138.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:483) > at > org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:408) > at > org.apache.camel.component.bean.MethodInfo$1.doProceed(MethodInfo.java:279) > at > org.apache.camel.component.bean.MethodInfo$1.proceed(MethodInfo.java:252) > at > org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:177) > at > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109) > at > org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:68) > at > org.apache.camel.component.bean.BeanProducer.process(BeanProducer.java:38) > at > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:141) > at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77) > at > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:460) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:121) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:83) > at > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:460) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190) > at > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109) > at > org.apache.camel.processor.MulticastProcessor.doProcessParallel(MulticastProcessor.java:814) > at > org.apache.camel.processor.MulticastProcessor.access$200(MulticastProcessor.java:84) > at > org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:314) > at > org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:299) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
