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)
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)