Hi

what you need is the properties component. Look here: http://camel.apache.org/properties.html

then you can refer your endpoint like this

.to("{{myHttpEndpoint}}")

where you have that defined in your properties like this:

myHttpEndpoint=http://servername.com/test

regards, Marco

Am 26.01.2012 01:00, schrieb anand sridhar:
Hi,
I have a route with the endpoint being a HTTP URL.
It so happens that this URL is in a  properties file.

Could some one help me to understand how I can dynamically load the end
point name from a property file or in general from header, property etc..?

apparently, none of these work

from("jms:q1")
.to("${properties:httpurl}")

or
from("jms:q1")
.to(header("httpurl"));

or

from("jms:q1")
.to(property("httpurl"));

does not resolve even though the httpurl parameter is present in header as
well as property.

Thanks,
Anand


Reply via email to