Reputation: 175
I need to control my routes and I am using spring DSL for Camel.
I need to exposed a service which will perform thoses actions to the routeId given in paramaters.
The following code does not work (the body contain the routeId)
<route id="stopRoute">
<from uri="direct:stopRoute"/>
<log message="about to stop a route"/>
<to uri="controlbus:route?routeId=${body}&action=stop"/>
<to uri="controlbus:route?routeId=${body}&action=status"/>
</route>
I also tried with simple language but I can't figure out the correct syntax
Upvotes: 1
Views: 468
Reputation: 55540
See this FAQ http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html
Use <toD>
to make the to dynamic.
Upvotes: 1