Hi

I assume fromLocation is a file endpoint?

You can try setting option runLoggingLevel=INFO, then Camel logs a
INFO level when the file consumer runs on each poll. Then you can see
if that loggings does not resume when you resume Camel.

Also with JMX you can take a look at the scheduled thread pool the
file consumer uses, under threadpools. and see if its task count goes
up. Or if there core thread count is not 1.

There has been this odd situation in the past that the scheduled
thread pool seems "vanished" and didn't kick in new tasks as it was
supposed to. And that is usually if there was a java.lang.Error or
something that escaped the runnable task, causing the thread pool to
not reschedule a task. We do have try .. catch for this now.







On Mon, Mar 11, 2013 at 5:29 AM, rajesh_h <rajes...@hotmail.com> wrote:
> Here is the route-psp1
>
> // Processing one csv file at a time
> from(fromLocation).routeId("route-psp1")
>         .choice()
>                 .when(simple("${file:ext} == 'csv'")).to("direct:csv")
>                 .otherwise().log("Ignoring unknown file ${file:name}");
>
> // And here is route-psp2, which streams 1000 lines at a time and processes
> them.
> from("direct:csv").routeId("route-psp2")
>                         .process(new LogFileInitializer())                    
>           // Initialize the File Appender
>                         .log("Processing file ${file:name}")
>                         .beanRef("pspWorkingContext", "initialize")           
>   // Initialize the working
> context
>                         .split().tokenize("\n", 1000).streaming()             
>   // Stream 1000 lines at a time
>                                 .log("Stream the next 1000 lines")
>                                 .to("direct:thousands")
>                         .end()
>                         .log("Processed file ${file:name}")                   
>           // Done processing the file.
>                         .choice()
>                                 .when().method("pspWorkingContext", 
> "stopRoute")        // If the route was
> stopped, move to retry location.
>                                         .log("Moving file ${file:name} to 
> retry location as r-${file:name}")
>                                         .to(getRetryEndPoint()).end()
>                         .beanRef("pspWorkingContext", "done")
>                 .to(getToEndPoint());
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/CamelContext-resume-does-not-reactivate-the-route-tp5728862p5728913.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

Reply via email to