camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arnoldmad <>
Subject Use Properties in a Predicate
Date Thu, 24 Jul 2014 13:23:58 GMT
Hi !

I'm pretty new to camel and have the following Question:

I have a route that uses multiple different components. based on the
availability of external systems I might want to use a component or not.


What I want to do now is replace the hardcoded URIs in the to Java DSL
functions using PropertyPlaceholder. 
For that I created a PropertyPlaceholder bean and change the route to
something like this:


Till now everything is fine. My problem starts when I want to do something
F.e. I want to only call comp1 URI if the URI is set to a real comp1 URI and
is not disabled in the PropertyPlaceholder file.
For that I changed the route to something like that:


here the problem starts as when I call simple() it doesn't find the comp1URI
property (however if I use it in the to() statement it can find the

What am I doing wrong here or whats the best approach to make a when choice
based on something set in a properties file ?

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message