Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 48526 invoked from network); 16 Jun 2009 14:10:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Jun 2009 14:10:32 -0000 Received: (qmail 34586 invoked by uid 500); 16 Jun 2009 14:10:44 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 34547 invoked by uid 500); 16 Jun 2009 14:10:43 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 34537 invoked by uid 99); 16 Jun 2009 14:10:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jun 2009 14:10:43 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of cmoulliard@gmail.com designates 209.85.218.226 as permitted sender) Received: from [209.85.218.226] (HELO mail-bw0-f226.google.com) (209.85.218.226) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jun 2009 14:10:33 +0000 Received: by bwz26 with SMTP id 26so3854939bwz.20 for ; Tue, 16 Jun 2009 07:10:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=452ASitjQTMrXysrQQfuHrdvpP9ORfai0un48JfqL+Y=; b=FvGlEKqOi8hQXHye1Dx+EUo4He9857xzIVhCrS8fVbgFaH6VuOSnYOD/pcRUqCWR0d 8XYMQ9ebwGXAo6xspZ28Uk5RJhwt4w5c1LbFD4QW0JN2lbq6gyHzoDFj/mxeFNbF9Qxq eXBbGW4B8bVtKmGR8sJ/rq8b8gCzx0IaNtasQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=PH3vEyxlUgyzeGOVOvGHDYjUaREwAcCtvv5kqlXMrZAL9EP1+UoPKV28tZXk2+EtWj VJQ/Ufue1XoSEbmVo+2MZZAKNU8HgzsoH5ki2BneSVWO36pV04ipghIIfbdniSz9VGwT +GM7peDUDpIpamjOZ0Ym7ujl4LneiuzG5ArMc= MIME-Version: 1.0 Received: by 10.103.175.8 with SMTP id c8mr4505896mup.117.1245161411259; Tue, 16 Jun 2009 07:10:11 -0700 (PDT) In-Reply-To: <5380c69c0906160703l60074953jdd972c680a0c3f86@mail.gmail.com> References: <5380c69c0906160703l60074953jdd972c680a0c3f86@mail.gmail.com> Date: Tue, 16 Jun 2009 16:10:11 +0200 Message-ID: Subject: Re: Information required about IN/OUT pattern of splitter EIP From: Charles Moulliard To: users@camel.apache.org Content-Type: multipart/alternative; boundary=001636b431b49b2d6a046c77bbf9 X-Virus-Checked: Checked by ClamAV on apache.org --001636b431b49b2d6a046c77bbf9 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit What do you mean by 1 = OUT, 2+ = IN ? Charles Moulliard Senior Enterprise Architect Apache Camel Committer ***************************** blog : http://cmoulliard.blogspot.com On Tue, Jun 16, 2009 at 4:03 PM, Claus Ibsen wrote: > [15:59] chm007 its because of using AggregatorStrategy is > very low level > [15:59] you work on Exchange directly > [15:59] and it depends on how many processing steps you have > in the split sub route > [15:59] 1 = OUT > [15:59] 2+ = IN as Camel will use a Pipeline under the converers > [15:59] so Camel will do a OUT -> IN in the next processor > [15:59] so OUT -> IN to the AggregatorStrategy also > [15:59] its a bit confusing > [16:00] will be better when you can use a POJO for aggregation > > On Tue, Jun 16, 2009 at 2:11 PM, Charles Moulliard > 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 > --001636b431b49b2d6a046c77bbf9--