[15:59]  <cibsen> chm007 its because of using AggregatorStrategy is
very low level
[15:59]  <cibsen> you work on Exchange directly
[15:59]  <cibsen> and it depends on how many processing steps you have
in the split sub route
[15:59]  <cibsen> 1 = OUT
[15:59]  <cibsen> 2+ = IN as Camel will use a Pipeline under the converers
[15:59]  <cibsen> so Camel will do a OUT -> IN in the next processor
[15:59]  <cibsen> so OUT -> IN to the AggregatorStrategy also
[15:59]  <cibsen> its a bit confusing
[16:00]  <cibsen> will be better when you can use a POJO for aggregation

On Tue, Jun 16, 2009 at 2:11 PM, Charles Moulliard<cmoulli...@gmail.com> wrote:
> Hi,
>
> I'm a little confused about the split EIP pattern combined with aggregation
> strategy. In the example (see http://camel.apache.org/splitter.html - Split
> aggregate request/reply sample), the out exchange is used to retrieved the
> body content and also to set it because the pattern is of type InOut.
>
> I have created an aggregator but in my case, I must use the content of the
> In to retrieve my body
>
>        List requestMessages = new ArrayList();
>
>        if (oldExchange == null) {
>
> requestMessages.add(newExchange.getIn().getBody(RequestMessage.class));
>            newExchange.getOut().setBody(requestMessages);
>            return newExchange;
>        } else {
>            // Get old messages
>            requestMessages = oldExchange.getIn().getBody(List.class);
>
>            // Get new and add it to the list
>
> requestMessages.add(newExchange.getOut().getBody(RequestMessage.class));
>
>            // Add to the exchange
>            oldExchange.getOut().setBody(requestMessages);
>            return oldExchange;
>
>        }
>
>
> Questions :
> - Is the split EIP an InOut pattern ?
> - When I develop the aggregator like this, the headers of my messages have
> disappeared when the endpoint called after the end of the split receives the
> List of Objects. How can I avoid this ?
>
> Regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to