You can take a look at recipient-list which can take the message header
as a parameter to build up the endpoint uri.
[1]http://camel.apache.org/recipient-list.html
On Thu Nov 24 23:10:10 2011, suman wrote:
Hello All,
I have a question regarding dymaic uri inside toF() DSL
Given below is my route
from("direct:bootstraproute")
.setHeader(Exchange.HTTP_METHOD,constant(org.apache.camel.component.http4.HttpMethods.GET))
.toF("https4://myapi.com/%s.json?type=2",header("eventid"))
.setHeader(CacheConstants.CACHE_OPERATION,
constant(CacheConstants.CACHE_OPERATION_ADD))
.setHeader(CacheConstants.CACHE_KEY, header("eventid"))
.to("cache://MyCache");
My problem is inside toF DSL ,header("eventid") is getting evaluated when
the route is started and hence its not finding anything.Instead i want it to
get evaluated when the message arrives.Sorry if my question is silly as iam
quite new to camel.Any help would be appreciated
Thanks
--
View this message in context:
http://camel.465427.n5.nabble.com/Dynamic-Consumers-tp5020405p5020405.html
Sent from the Camel - Users mailing list archive at Nabble.com.
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang