camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: multiple <to /> recipients
Date Tue, 30 Sep 2008 13:28:14 GMT
2008/9/30 David Siefert <siefert.david.mailinglist@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

Mime
View raw message