camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Wolf <cwolf.a...@gmail.com>
Subject Re: conditional uri
Date Tue, 16 Jul 2013 14:17:11 GMT
It depends on what you mean by "conditional" -  if you mean
conditional at route-definition time, you can use property placeholders
and/or Language Expressions.

If you mean conditional at runtime, then I'm pretty sure you can only do that
with producer endpoints (i.e. "to" endpoints) see:

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

If you want conditional runtime consumer endpoints, the only solution I have
been able to come up with is dynamically created routes that are created at
runtime; this logic is encapsulated in a custom processor.

    -Chris




On Tue, Jul 16, 2013 at 9:46 AM, boris <boris.shukhat@barclays.com> wrote:
> How could I have a conditional uri string?
> For example,
> I have <from uri="prod_uri"   in production and <from uri="direct:start"
> for testing.
> I want to have a single xml file for both and manage uri string
> conditionally.
> Thanks,
> Boris
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/conditional-uri-tp5735724.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message