You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ABouchama <ti...@yahoo.Fr> on 2013/06/09 12:14:47 UTC
Camel specific recipient list
Hello,
I have the following need :
+ I receive message in the queue IN
+ I want to route the same message to the endpoints defined in the header
property "Partner" = (A, B, C)
+ Each message routed by the recipient list should have a specific header
property, for example for the endpoint A, we should have Partner = A, and
the same for endpoint B & C.
How we can acheive this ?
Tried route :
<route>
<from uri="activemq:queue:IN" />
<setHeader headerName="Partner">
<simple>A, B, C</simple>
</setHeader>
<recipientList delimiter=",">
<simple>activemq:queue:{Endpoint}?preserveMessageQos=true</simple>
</recipientList>
</route>
Thanks
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-specific-recipient-list-tp5734048.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel specific recipient list
Posted by Christian Müller <ch...@gmail.com>.
By re-reading your mail, I think you are looking for something like
recipientList().method(MessageRouter.class, "routeTo")
Check out the documentation about this at [1]. You can do the same using
XML. You can inject your raw endpoint uri into this bean and append it with
the header value - or something like this...
[1] http://camel.apache.org/recipient-list.html -> Using method call as
recipient list
Best,
Christian Müller
-----------------
Software Integration Specialist
Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html
https://www.linkedin.com/pub/christian-mueller/11/551/642
On Tue, Jun 11, 2013 at 9:27 AM, ABouchama <ti...@yahoo.fr> wrote:
> Any suggestions or ideas ?
>
> Thanks
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-specific-recipient-list-tp5734048p5734079.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
Re: Camel specific recipient list
Posted by Christian Müller <ch...@gmail.com>.
Why do you use
"<simple>activemq:queue:{Endpoint}?preserveMessageQos=true</simple>"?
Can you try
"<simple>activemq:queue:${header.Partner}?preserveMessageQos=true</simple>"?
Check out also our FAQ entry about this at
http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html.
Best,
Christian Müller
-----------------
Software Integration Specialist
Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html
https://www.linkedin.com/pub/christian-mueller/11/551/642
On Tue, Jun 11, 2013 at 9:27 AM, ABouchama <ti...@yahoo.fr> wrote:
> Any suggestions or ideas ?
>
> Thanks
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-specific-recipient-list-tp5734048p5734079.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
Re: Camel specific recipient list
Posted by ABouchama <ti...@yahoo.Fr>.
Any suggestions or ideas ?
Thanks
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-specific-recipient-list-tp5734048p5734079.html
Sent from the Camel - Users mailing list archive at Nabble.com.