camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: dynamic property keys
Date Thu, 14 Jun 2012 04:05:10 GMT
On Wed, Jun 13, 2012 at 7:29 PM, paramjyotsingh <paramjyotsingh@gmail.com>wrote:

> I am trying to read a property with dynamic property key
>
> i have property like
>
> 1234_host=<hostname>
> 1234_port=<port>
>
> where "1234" is group code, and it it dynamic, i will extract it from input
> file i receive and consume service running at this host
>
> i have configuration like
>
> <route>
>  <from uri="file://inputfolder/" />
>  <bean ref="extractGroupAndSetInHeader" />
>  <setHeader headerName="groupHost">
>        <constant>{{${in.header.groupID}_host}}</constant>
>  </setHeader>
>  <setHeader headerName="groupPort">
>        <constant>{{${in.header.groupID}_port}}</constant>
>  </setHeader>
>  <recipientList>
>
>
Can you try with simple instead of the constant
<simple>${properties:${header.groupID}_host}</simple>




> <simple>cxfrs://http://
> ${header.groupHost}:${header.groupPort}/item/${in.header.itemId}</simple>
>  </recipientList>
> </route>
>
> But reading property with dynamic key does not works this way.
>
> Can someone please help me about how to read properties with dynamic keys
> in
> camel spring DSL.
>
> Thanks and Regards,
> Paramjyot Singh
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/dynamic-property-keys-tp5714449.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message