I am trying to remove a route using   camelContext.removeRoute(routeId) but I
only want to do it one the route is complete.  I have the below snippet of
code, I attempted to use onCompletion, but no luck.


val camel = CamelExtension(system)
 camel.context.addRoutes(new CustomRouteBuilder(system, producer))

 class CustomRouteBuilder(system: ActorSystem, producerActor: ActorRef)
extends RouteBuilder {

        def configure {
          from(route.source.uri).to(route.target.uri)
            .routeId(route.source.id)
        }
      }



--
View this message in context: 
http://camel.465427.n5.nabble.com/Removing-a-route-after-it-is-completed-tp5761836.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to