It’s not a good idea, the custom processor blocks the whole camel route 
processor chain, which could introduce some performance issue.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On February 13, 2014 at 9:35:33 AM, eswar (easwaramoor...@gmail.com) wrote:
>  
>  
> more specifically, I am not sure if we can do something like this,  
> which is
> to resume the route after a delay. I am not able to use RoutingPolicy  
> as the
> time is a dynamic component and my routes are defined in the Spring  
> XML.
>  
> Processor(Exchange exchange) {
> exchange.setProperty(exchange.ROUTE_STOP, Boolean.TRUE);  
> Thread.currentThread().sleep(4000);
> System.out.println("#### Restart the route ... ");
> exchange.setProperty(exchange.ROUTE_STOP, Boolean.FALSE);  
> }
>  
> #### Restart the route ...
> [melRoute) thread #2 - vm://ssh] SedaConsumer WARN Error
> processing exchange. Exchange[file.00001]. Caused by:
> [java.util.NoSuchElementException - null]
> java.util.NoSuchElementException
> at java.util.ArrayList$Itr.next(Unknown Source)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:77)  
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)  
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)  
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:91)
>   
> at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
>   
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>   
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)  
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)  
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>   
> at
> org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:291)
>   
> at
> org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:200)  
> at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:147)  
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown  
> Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown  
> Source)
> at java.lang.Thread.run(Unknown Source)
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Resume-an-Endpoint-in-a-Route-tp5747151p5747208.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  

Reply via email to