camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: How to stop particular routes in camel context based on elapsed time?
Date Wed, 04 May 2016 14:44:12 GMT
Some details here
http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html

Also there is API on CamelContxt to stop/start/suspend/resume routes
http://camel.apache.org/lifecycle

And there is the control bus eip
http://camel.apache.org/controlbus.html

On Mon, May 2, 2016 at 10:44 PM, polanki <varadaraja.polanki@pimco.com> wrote:
> if I have sample script like below.
>
> In this script different routes in context starts in different times. In the
> same way I want to stop particular route after specified time rather than
> stopping entire context. How can I do this?
> Like InitialDelay is there termination time for route?
>
>       final CamelContext camelContext = new DefaultCamelContext();
>         try {
>           camelContext.addRoutes(
>             new RouteBuilder() {
>               @Override
>                 public void configure() throws Exception {
>
>
> from("ftp://prodpmst11.com/TEST2/?username=AAAA&password=BBBB"
>                      +
> "&initialDelay=10s&delay=5s&backoffMultiplier=6&backoffIdleThreshold=5"
>                      + "&delete=true&greedy=true").
>                      to("file:C:\\personal\\input\\fold");
>
>
> from("ftp://prodpmst22.com/TEST3/?username=XXXX&password=YYYYY"
>                           +
> "&initialDelay=1s&delay=5s&backoffMultiplier=6&backoffIdleThreshold=5"
>                           + "&delete=true&greedy=true").
>                           to("file:C:\\personal\\input\\fold1");
>                 }
>             });
>             camelContext.start();
>             Thread.sleep(100000);
>             camelContext.stop();
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-stop-particular-routes-in-camel-context-based-on-elapsed-time-tp5782090.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Mime
View raw message