On Thu, Nov 15, 2012 at 2:11 PM, Erkki Lindpere
<[email protected]> 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: [email protected]
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to