camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Routing REST request to external URI
Date Tue, 12 Mar 2013 18:06:20 GMT
On Tue, Mar 12, 2013 at 5:33 PM, ramrubio <ramrubio@yahoo.com> wrote:
> Hi,
>
> Noticed that RouteBuilder is cached and called only once to construct the
> routes.
>
> From documentation they mention using DynamicRouter for implementing dynamic
> uri routing.
>
> But it seems that even in this case it is not dynamic routing as the routes
> need to be predefined and the dynamic part is simply returning the route id
> in the slip method to determine which pre-defined route to choose?
>
> What i would like to do is dynamically add the route (not pre-defined) is
> this possible through Dynamic Router Pattern or am i looking at the wrong
> thing?
>
> /Ramon
>

You can use the API from CamelContext to add/remove routes dynamically
at runtime.

And you can also call this API from within a route.
Though mind that if you want to stop and remove a route from within
the same route, then this is a bit more tricky. Then see this FAQ
http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html

The EIPs themselves is part of an existing route.
http://camel.apache.org/eip


>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Routing-REST-request-to-external-URI-tp5728852p5729004.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message