camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
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
<erkki.lindpere@zeroturnaround.com> 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.
http://camel.apache.org/graceful-shutdown.html

> 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
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message