camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Starting and Suspending routes
Date Thu, 25 Mar 2010 15:47:20 GMT
On Thu, Mar 25, 2010 at 10:39 AM, Tarjei Huse <> wrote:
> Hi,
> Yesterday C. Ibsen tough me that you cannot start and stop routes when you
> use JMS connectors, but you can suspend them using a route policy.

Your problem was that you wanted to stop a JMS listener in the same
thread it was processing the message.
So by suspending it you can do it in a more gentle way that the JMS
listener can comply with.

You can still stop it from another thread if you like. However using
suspend is more gentle, and works better,
especially if you do more start/stop kinda of things.

> Today I want to rewrite a simple interface I've written to handle starting
> and stopping routes so that they are suspended instead - I.e. that I work
> with the incoming consumers of each route.
> Now, I'm wondering what is the best way to get this done. I usually write my
> routes so that they start and stop at an JMS endpoint for persistence.
> Is there a way to find out if a route has been suspended and resume it or
> should I just add a default routepolicy to each route and use it to suspend
> and resume routes as well?

Yeah you should be able to get some details of the state of routes.
There should be API for that somewhere :)

> Kind regards,
> Tarjei
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Apache Camel Committer

Author of Camel in Action:
Open Source Integration:

View raw message