camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Reloading Camel routes with JRebel
Date Fri, 16 Nov 2012 07:43:28 GMT
On Thu, Nov 15, 2012 at 2:11 PM, Erkki Lindpere
<> wrote:
> Hi,
> I'm from ZeroTurnaround and started working on a JRebel Camel plug-in. The
> current plan is to update routes whenever a RouteBuilder class changes.
> Feel free to suggest other things that a JRebel-Camel plug-in should do.

Ah this sounds very cool.

> I have a basic prototype working, and what I do is removeRouteDefinitions,
> then rerun the RouteBuilder to add the changed ones back.
> A problem I have is when to trigger a reload. If I trigger it once a
> message comes in (JRebel usually does things lazily), the reloading of the
> route causes the message in progress to fail.

If you remove the route first using that API call ^^^, then Camel will
stop the routes first in a graceful manner.

> Is there any way to safely find a point where a route can be updated?

So after this call, then there ought not to be any inflight messages.
And a safe point to reload a new RouteBuilder with routes.

> Regards
> Erkki Lindpere

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

View raw message