camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Trigger start/stop/resume/suspend of a camel route using queue, db
Date Mon, 29 Oct 2012 09:38:18 GMT
On Thu, Oct 25, 2012 at 4:06 PM, rajasekar <> wrote:
> Hi ,
> Can you provide me some sample of camel context which uses suspend and
> resume route .
> I have requirement to suspend a route ( in a camel-context.xml ) when n
> number errors occurred calling a http endpoint and stop consuming messages
> from jms queue for x time and resume this route to start consuming messages
> from jms queue and send it to http endpoint.

See this page

You can then add logic in onExchangeDone and check for failure, and
then react accordingly.
To suspend/stop a route see the next FAQ

See this FAQ

An alternative is to use an event notifier to listen on events, and
then react accordingly.

Then you can listen for exchanges failed, and coming from a given
route/endpoint as origin. To know it was from the route you want to
suspend if X number of errors etc.

There is API on CamelContext to control routes, to suspend/stop/start etc.

> Regards
> Raj
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Red Hat, Inc.
FuseSource is now part of Red Hat
Twitter: davsclaus
Author of Camel in Action:

View raw message