camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: RecipientList without aggregation
Date Sat, 31 Mar 2012 10:34:10 GMT
Hi

Sometimes you can also just use a bean method, and from there use the
ProducerTemplate to send your messages wherever you want, and you can
send multiple messages to X different endpoints etc. And you don't
have to wait for replies as you can send the messages as one-way etc.

If you got the Camel in Action book, then see section 10.5.2, which
has an example of sending a copy of a message to X endpoints, and then
waiting at most X time before computing a reply. In your example you
dont have to wait at all.


On Wed, Mar 28, 2012 at 11:33 PM, Reuben Garrett
<reubengarrett@gmail.com> wrote:
> Mario,
>
> if you know in advance which beans will be consuming from the endpoint, you
> could define them statically using Multicast, without the dynamism of
> Recipient-List.  if you don't need to await responses from the Multicast
> targets before continuing from the Multicast block to the next pipe in the
> route, i think setting parallelProcessing=true and streaming=true, combined
> with using the inOnly Message Exchange Pattern [1] for each target in the
> Multicast, *might* work (committers - is this correct?).
>
> however, i employed a different approach for a similar scenario where i
> just need to dispatch a "fire-and-forget" event to a set of consumers.  i
> used SEDA [2] queues with multipleConsumers=true for a lightweight
> multicast.  if you want to, you could even combine outputs later on in a
> "gathering" SEDA queue that funnels into an aggregator or other processor /
> Enterprise Integration Pattern [3].
>
> SEDA is probably my favorite component as there are some fun split/join
> flows you can orchestrate with it.
>
> [1]: http://camel.apache.org/exchange-pattern.html
> [2]: http://camel.apache.org/seda.html
> [3]: http://camel.apache.org/enterprise-integration-patterns.html
>
> ~ Reuben
>
> On Wed, Mar 28, 2012 at 14:31, mgiammarco <mgiammarco@gmail.com> wrote:
>
>> Hello,
>> I am getting confused because there are so many ways to do this thing.
>>
>> I need that, in my route message X get copied n times to n different beans.
>> I need to choose which beans as recipientlist patterns says. Now I need
>> that
>> each bean is parallel processed.
>>
>> But I do NOT need absolutely messages aggregation. I do NOT need also that
>> faster beans wait for slower beans before sending the result.
>>
>> I need simply that the n messages will go in an output route as fast as
>> possible.
>>
>> I am looking recipientlist, multicast, parallel processing and I am getting
>> confused. I think recipientlist with an header with the list of beans can
>> work but I am not sure.
>>
>> Can you help me?
>>
>> Thanks,
>> Mario
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/RecipientList-without-aggregation-tp5601505p5601505.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message