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:[EMAIL PROTECTED] 
Sent: 30. september 2008 15:28
To: camel-user@activemq.apache.org
Subject: Re: multiple <to /> recipients

2008/9/30 David Siefert <[EMAIL PROTECTED]>:
> 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

Reply via email to