There is an external camel-consul component. Not sure what functions
it provides, but you can take a look
https://github.com/bprager/camel-consul

For the Camel endpoints in the CB you can use recipinent list / toD as
dynamic to, where you can have an expression / bean etc that lookup in
consul and get the list of endpoints and pick one of them.

http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html

At Apache Camel we will work on ribbon as the client side LB'er
https://issues.apache.org/jira/browse/CAMEL-9683

That said it may not mean we can plugin others in the future such as
consul or other registries.


On Wed, Mar 30, 2016 at 3:35 PM, rogerhill01234
<rpillarise...@pdxinc.com> wrote:
> Is there a way to leverage Consul for service discovery in Camel routes? For
> example, in the code below, how can I make the "to" end points cognizant of
> Consul services?
>
> from("direct:start").loadBalance()
>     .circuitBreaker(2, 1000L, MyCustomException.class)
>     .to("http://hostname1:port/resourceUri,
> http://hostname2:port/resourceUri";);
>
> From what I see, a route is statically defined. Is there a way to make it
> more dynamic, so that for every message, the list of endpoints in "to" is
> dynamically computed?.
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-Consul-integration-tp5780039.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to