Hi Claus,
Why is graceful shutdown important for suspend/resume?
I think this is what I need..
myCamelContext.suspendRoute("routeId");
myCamelContext.resumeRoute("routeId");
We are using @consume, is there a way to specify routeId when using
@consume? or a way to call suspendRoute from @consume?
Thanks, Tom
On Tue, Dec 20, 2011 at 2:57 PM, Claus Ibsen <[email protected]> wrote:
> On Tue, Dec 20, 2011 at 3:53 PM, Tom Howe <[email protected]> wrote:
> > Thanks, is there an example of how to suspend a route?
> >
>
> You can use JMX, for example the examples/camel-example-management
>
> The API on CamelContext should have methods to suspend/resume routes.
> And this is the API you should use,
> as they use the proper logic with graceful shutdown
> http://camel.apache.org/graceful-shutdown.html
>
> And there is a FAQ to stop a route from a route
> http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html
>
> >
> > On Mon, Dec 19, 2011 at 3:52 PM, Claus Ibsen <[email protected]>
> wrote:
> >
> >> Hi
> >>
> >> Some routes support suspend/resume.
> >>
> >> See
> >> http://camel.apache.org/lifecycle
> >>
> >> On Mon, Dec 19, 2011 at 3:59 PM, Tom Howe <[email protected]> wrote:
> >> > Hi,
> >> >
> >> > If we have a route where we are consuming messages and posting to a
> REST
> >> > service which occasionally returns 503 when busy, is there a way to
> pause
> >> > the route for a while so we don't hammer the busy REST service? We
> also
> >> > have other routes in the same Camelcontext that we would not want to
> >> pause.
> >> > We have tried stopping/starting the route but this seems slow - I
> suspect
> >> > it is starting stopping the underlying thread pools.
> >> >
> >> >
> >> > Thanks, Tom
> >>
> >>
> >>
> >> --
> >> Claus Ibsen
> >> -----------------
> >> FuseSource
> >> Email: [email protected]
> >> Web: http://fusesource.com
> >> Twitter: davsclaus, fusenews
> >> Blog: http://davsclaus.blogspot.com/
> >> Author of Camel in Action: http://www.manning.com/ibsen/
> >>
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: [email protected]
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>