camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Quinn Stevenson <qu...@pronoia-solutions.com>
Subject Re: How to stop a dynamic route
Date Mon, 13 Jun 2016 17:36:44 GMT
I haven’t tested this code, but something like this should do what you’re after
from("file://source").routeId( "my-route")
        .filter( header("CamelBatchComplete").isEqualTo( true ) )
            .toF( "controlbus://route?routeId=%s&action=%s", "my-route", "stop")
        .end();

Hope that helps

> On Jun 8, 2016, at 10:12 AM, Brad Johnson <brad.johnson@mediadriver.com> wrote:
> 
> Processing the files once is what the idempotent flag is for as noted.  It
> won't reprocess the same files. The route is still there but it won't
> continually respin over your file.
> 
> On Wed, Jun 8, 2016 at 10:48 AM, Daniel P22 <pompadaniel@gmail.com> wrote:
> 
>> I need to start the route, process the files once and then stop and remove
>> the route.
>> 
>> Then the route maybe in future can be started again and I need the route
>> process the same files again.
>> 
>> Maybe I dont need to destroy the route but at least stop. And I have to
>> stopped when the CamelBatchComplete is true.
>> 
>> Thanks.
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/How-to-stop-a-dynamic-route-tp5783385p5783728.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message