camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Custom behavior on route shutdown
Date Tue, 04 Oct 2011 15:51:43 GMT
On Tue, Oct 4, 2011 at 5:11 PM, Jeff Segal <> wrote:
> I have an application which dynamically creates and removes routes in
> a camel context. I'd like to be able to invoke an onShutdown method
> when routes are removed so that I can perform some cleanup tasks. I've
> read but wasn't able to
> find a good solution there. Ideally I'd define a Runnable and
> configure it like this:
> from("foo:bar").to("abc:123").onShutdown(myRunnable);
> Is there some alternative that I missed or is this more of a feature request?

There is no such thing in the DSL.

Would could possible look into adding support for callbacks on
RoutePolicy, as you
could then associate a route with a policy, and have callbacks for
onStart / onStop / onShutdown wtc.

Fell free to create a JIRA ticket.

> Thanks,
> Jeff

Claus Ibsen
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message