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/12/19 22:22:04 UTC

RecipientList or DynamicRouter or RoutingSlip

Hello,I have the need :from --> in.header.Recipient=A,B,C --> Send message to
the queue:A with Receiver=A, queue:B with Receiver=B, queue:C with
Receiver=C.I have read the documentation and all EIP, and I'm a bit lost
with what component or what pattern I can use to make this route.Thanks in
advance,



--
View this message in context: http://camel.465427.n5.nabble.com/RecipientList-or-DynamicRouter-or-RoutingSlip-tp5745069.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: RecipientList or DynamicRouter or RoutingSlip

Posted by "kraythe ." <kr...@gmail.com>.
not a good idea. Wiretap makes a copy of an exchange and is used for things
like logging and monitoring. You are using a wrench to cut down a tree. You
might cut it down but the next guy will have no idea why the wrench is the
tool. Use the right tool, either recipient list or dynamic router.

*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
<http://www.linkedin.com/pub/robert-simmons/40/852/a39>*


On Mon, Dec 23, 2013 at 2:16 AM, ABouchama <ti...@yahoo.fr> wrote:

> Thanks for your response,I thought to a solution, if it is possible to use
> ?Use RecipientList with list of wiretap with defined headereg:wiretap:uri
> =activemq: queue: A,header=Awiretap:uri =activemq: queue: B,header=Bis it
> possible ?Thanks in advance,
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/RecipientList-or-DynamicRouter-or-RoutingSlip-tp5745069p5745182.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: RecipientList or DynamicRouter or RoutingSlip

Posted by ABouchama <ti...@yahoo.Fr>.
Thanks for your response,I thought to a solution, if it is possible to use
?Use RecipientList with list of wiretap with defined headereg:wiretap:uri
=activemq: queue: A,header=Awiretap:uri =activemq: queue: B,header=Bis it
possible ?Thanks in advance,



--
View this message in context: http://camel.465427.n5.nabble.com/RecipientList-or-DynamicRouter-or-RoutingSlip-tp5745069p5745182.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: RecipientList or DynamicRouter or RoutingSlip

Posted by "kraythe ." <kr...@gmail.com>.
Typically you would use a recipient list if there are potentially more than
one receiver or if the receiver is not known at compile time. So if you
have a record where the receiver is calculated off some data from another
system you would use a recipient list. If you have known routing situation
at compile time you would use a dynamic router because dynamic routers have
much clearer semantics when you look at the code.

On Saturday, December 21, 2013, Henrique Viecili wrote:

> The requirement seems a bit odd as the receiver header could be derived at
> the consumer, anyway you may be able to access the
> Exchange.RECIPIENT_LIST_ENDPOINT property or perhaps try setting
> onPrepareRef with a custom processor to figure out the header.
>
> Henrique Viecili
>
>
> On 20 December 2013 19:13, ABouchama <titexe@yahoo.fr <javascript:;>>
> wrote:
>
> > Thanks for your reply,
> >
> > The Dynamic RecipientList allow only to send the same messages to a
> Dynamic
> > list of endpoints.
> >
> > My need, is to send the same message and overriding his header=Receiver
> > following endpoints
> > Receiver=A for endpoint =A
> > Receiver=B for endpoint =B ...etc
> >
> > Thanks for help
> >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/RecipientList-or-DynamicRouter-or-RoutingSlip-tp5745069p5745092.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>


-- 
*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
<http://www.linkedin.com/pub/robert-simmons/40/852/a39>*

Re: RecipientList or DynamicRouter or RoutingSlip

Posted by Henrique Viecili <vi...@gmail.com>.
The requirement seems a bit odd as the receiver header could be derived at
the consumer, anyway you may be able to access the
Exchange.RECIPIENT_LIST_ENDPOINT property or perhaps try setting
onPrepareRef with a custom processor to figure out the header.

Henrique Viecili


On 20 December 2013 19:13, ABouchama <ti...@yahoo.fr> wrote:

> Thanks for your reply,
>
> The Dynamic RecipientList allow only to send the same messages to a Dynamic
> list of endpoints.
>
> My need, is to send the same message and overriding his header=Receiver
> following endpoints
> Receiver=A for endpoint =A
> Receiver=B for endpoint =B ...etc
>
> Thanks for help
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/RecipientList-or-DynamicRouter-or-RoutingSlip-tp5745069p5745092.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: RecipientList or DynamicRouter or RoutingSlip

Posted by ABouchama <ti...@yahoo.Fr>.
Thanks for your reply,

The Dynamic RecipientList allow only to send the same messages to a Dynamic
list of endpoints.

My need, is to send the same message and overriding his header=Receiver
following endpoints
Receiver=A for endpoint =A
Receiver=B for endpoint =B ...etc

Thanks for help



--
View this message in context: http://camel.465427.n5.nabble.com/RecipientList-or-DynamicRouter-or-RoutingSlip-tp5745069p5745092.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: RecipientList or DynamicRouter or RoutingSlip

Posted by Henrique Viecili <vi...@gmail.com>.
Take a look at Dynamic Recipient List [1], you could use a custom build
bean to define the list of endpoints or a combination of header/tokenizer
to achieve what you want.

[1]
http://camel.apache.org/recipient-list.html#RecipientList-DynamicRecipientList


Henrique Viecili


On 20 December 2013 08:22, ABouchama <ti...@yahoo.fr> wrote:

> Hello,I have the need :from --> in.header.Recipient=A,B,C --> Send message
> to
> the queue:A with Receiver=A, queue:B with Receiver=B, queue:C with
> Receiver=C.I have read the documentation and all EIP, and I'm a bit lost
> with what component or what pattern I can use to make this route.Thanks in
> advance,
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/RecipientList-or-DynamicRouter-or-RoutingSlip-tp5745069.html
> Sent from the Camel - Users mailing list archive at Nabble.com.