Did you checked out [1]? Camel will first stop the consumer to make sure no new messages are consumed. Afterwards Camel tries to finish the processing of inflight messages before the route is shut down. There is no need to deal with the RemoveRouteDefinitions.
[1] http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html Best, Christian 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. > > 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. > > Is there any way to safely find a point where a route can be updated? > > Regards > Erkki Lindpere > --
