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: Split, filter, aggregate zero messages
Date Wed, 13 Jun 2012 09:43:28 GMT
On Wed, Jun 13, 2012 at 9:52 AM, Gordienko, Max <Max.Gordienko@anz.com>wrote:

> Thank you Claus,
>
> > See the example with only splitter, where you dont need the aggregator
> EIP
>
> I tried to do as you suggested
>
>                from("direct:from")
>                        .split(body().tokenize("\n"), new
> ListAggregationStrategy())
>                        .filter(body().isNotEqualTo(""))
>                        .log(LoggingLevel.INFO, "processing")
>                        .end()
>                        .log(LoggingLevel.INFO, "compleated").stop();
>
> Looks like it does solve my problem:
> split to zero is still silently dropped,
> split to more elements does not aggregate the result, each message is
> processed in its own flow (compleated multiple times).
>
> Or do I missing something?
>
>
Read and learn the EIP patterns, and figure out what you want.
The Composed Message Processor is like a fork/join process.

In the aggregation strategy you can decide whatever you want and how you
want to join the pieces together.
If some of those pieces should not, due to a filter, then just skip that,
and return the old exchange.




> Thanks
>
> "This e-mail and any attachments to it (the "Communication") is, unless
> otherwise stated, confidential,  may contain copyright material and is for
> the use only of the intended recipient. If you receive the Communication in
> error, please notify the sender immediately by return e-mail, delete the
> Communication and the return e-mail, and do not read, copy, retransmit or
> otherwise deal with it. Any views expressed in the Communication are those
> of the individual sender only, unless expressly stated to be those of
> Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any
> of its related entities including ANZ National Bank Limited (together
> "ANZ"). ANZ does not accept liability in connection with the integrity of
> or errors in the Communication, computer virus, data corruption,
> interference or delay arising from or in respect of the Communication."
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message