On Wed, Oct 26, 2011 at 4:21 PM, rspeter <[email protected]> wrote:
> Good day,
>
> I am trying to use only spring config routes to consume message by
> JMSCorrelationID.
> I tried the following option, but it only works when I hardcode the param.
> Is there any workaround to consume and send response to the client by only
> using spring config without injecting a bean?
>
> Hardcoded working sample:
> <from
> uri="restlet:http://localhost:8077/poc/reply/{id}?restletMethods=post,get"/>
> <pollEnrich uri="activemq:test.www?selector=JMSCorrelationID %3D '1234'"/>
>
> NOT Working:
> <from
> uri="restlet:http://localhost:8077/poc/reply/{id}?restletMethods=post,get"/>
> <setHeader headerName="variable"><simple>${header.id}</simple></setHeader>
> <pollEnrich uri="activemq:test.www?selector=JMSCorrelationID %3D
> 'variable'"/>
>
Yes this is not supported. The uri attribute is sort of static.
What is needed is something like what recipient list can do, where it
accepts an expression for the endpoints.
A bit like that for pollEnrich / enrich is needed.
Something alike:
<pollEnrich>
<simple>activemq:test.www?selector=JMSCorrelationID %3D ${header.id}</simple>
</pollEnrich>
> Thanks
> Peter
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/pollEnrich-consumer-with-selector-tp4939908p4939908.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/