You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by David Siefert <si...@gmail.com> on 2008/09/30 15:22:58 UTC
multiple recipients
Hello all,
Following the site documentation, it appears that Camel is capable of
duplicating a message to multiple destinations by adding another <to />
element (talking Spring XML config here). For example, a Message received
in channel queue:input can be duplicated and sent to two channels
queue:input.application and queue:input.history with the following:
<route>
<from uri="queue:input" />
<to uri="queue:input.application" />
<to uri="queue:input.history" />
</route>
However in my case, I see only a few messages make it into the second
destination (queue:input.history) but all make it through the first
(queue:input.application). Is this incorrectly configured? is there a known
issue?
Any help would be appreciated!
Thanks,
David
Re: multiple recipients
Posted by David Siefert <si...@gmail.com>.
On Tue, Sep 30, 2008 at 8:28 AM, James Strachan <ja...@gmail.com>wrote:
> 2008/9/30 David Siefert <si...@gmail.com>:
> > Hello all,
> >
> > Following the site documentation, it appears that Camel is capable of
> > duplicating a message to multiple destinations by adding another <to />
> > element (talking Spring XML config here). For example, a Message
> received
> > in channel queue:input can be duplicated and sent to two channels
> > queue:input.application and queue:input.history with the following:
> > <route>
> > <from uri="queue:input" />
> > <to uri="queue:input.application" />
> > <to uri="queue:input.history" />
> > </route>
> >
> > However in my case, I see only a few messages make it into the second
> > destination (queue:input.history) but all make it through the first
> > (queue:input.application). Is this incorrectly configured? is there a
> known
> > issue?
> >
> > Any help would be appreciated!
>
> This is currently slightly confusing - we might want to clear this up
> a little in camel 2.0 - but having multiple 'to' steps creates a
> pipeline by default. So the output of input.application is sent to
> input.history. Responses in JMS assume that the consumer sends a reply
> back to the JMSReplyTo destination.
>
> To ensure things are a one-way publish to multiple endpoints, wrap in
> a <multicast>. e.g.
>
> <route>
> <from uri="queue:input" />
> <multicast>
> <to uri="queue:input.application" />
> <to uri="queue:input.history" />
> </multicast>
> </route>
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source Integration
> http://open.iona.com
>
Thanks James.
This worked perfectly as intendend. I did see <multicast /> another place on
the site, but was not sure what the difference was or if the documentation
was out of date.
Thanks again,
-David
RE: multiple recipients
Posted by Claus Ibsen <ci...@silverbullet.dk>.
Hi
Could we get a FAQ for this?
- Use multicast to send to multiple destinations, not multiple to
Med venlig hilsen
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk
-----Original Message-----
From: James Strachan [mailto:james.strachan@gmail.com]
Sent: 30. september 2008 15:28
To: camel-user@activemq.apache.org
Subject: Re: multiple <to /> recipients
2008/9/30 David Siefert <si...@gmail.com>:
> Hello all,
>
> Following the site documentation, it appears that Camel is capable of
> duplicating a message to multiple destinations by adding another <to />
> element (talking Spring XML config here). For example, a Message received
> in channel queue:input can be duplicated and sent to two channels
> queue:input.application and queue:input.history with the following:
> <route>
> <from uri="queue:input" />
> <to uri="queue:input.application" />
> <to uri="queue:input.history" />
> </route>
>
> However in my case, I see only a few messages make it into the second
> destination (queue:input.history) but all make it through the first
> (queue:input.application). Is this incorrectly configured? is there a known
> issue?
>
> Any help would be appreciated!
This is currently slightly confusing - we might want to clear this up
a little in camel 2.0 - but having multiple 'to' steps creates a
pipeline by default. So the output of input.application is sent to
input.history. Responses in JMS assume that the consumer sends a reply
back to the JMSReplyTo destination.
To ensure things are a one-way publish to multiple endpoints, wrap in
a <multicast>. e.g.
<route>
<from uri="queue:input" />
<multicast>
<to uri="queue:input.application" />
<to uri="queue:input.history" />
</multicast>
</route>
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com
Re: multiple recipients
Posted by James Strachan <ja...@gmail.com>.
2008/9/30 David Siefert <si...@gmail.com>:
> Hello all,
>
> Following the site documentation, it appears that Camel is capable of
> duplicating a message to multiple destinations by adding another <to />
> element (talking Spring XML config here). For example, a Message received
> in channel queue:input can be duplicated and sent to two channels
> queue:input.application and queue:input.history with the following:
> <route>
> <from uri="queue:input" />
> <to uri="queue:input.application" />
> <to uri="queue:input.history" />
> </route>
>
> However in my case, I see only a few messages make it into the second
> destination (queue:input.history) but all make it through the first
> (queue:input.application). Is this incorrectly configured? is there a known
> issue?
>
> Any help would be appreciated!
This is currently slightly confusing - we might want to clear this up
a little in camel 2.0 - but having multiple 'to' steps creates a
pipeline by default. So the output of input.application is sent to
input.history. Responses in JMS assume that the consumer sends a reply
back to the JMSReplyTo destination.
To ensure things are a one-way publish to multiple endpoints, wrap in
a <multicast>. e.g.
<route>
<from uri="queue:input" />
<multicast>
<to uri="queue:input.application" />
<to uri="queue:input.history" />
</multicast>
</route>
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com