I can't speak to Consul, but have a look at Camel's Recipient List[0], it's
exactly what you want for dynamic recipients.

Doug

[0] http://camel.apache.org/recipient-list.html

On Wed, Mar 30, 2016 at 7:35 AM, 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.
>

Reply via email to