Hi

See this FAQ about stopping a route from a route
http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html


On Wed, Aug 22, 2012 at 12:43 PM, hekonsek <[email protected]> wrote:
> Hi Ritu,
>
>> how to will I configure XML so that route will only run once
>
> Access CamelContext in Processor and close the route via
> CamelContext#stopRoute().
>
> from("direct:stopRoute").
>   process(new Processor() {
>     @Override
>     public void process(Exchange exchange) throws Exception {
>       String routeId = exchange.getIn().getBody(String.class);
>       exchange.getContext().stopRoute(routeId);
>     }
>   });
>
> Best regards.
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Stopped-Routes-tp474159p5717843.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to