Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 88173 invoked from network); 24 Jan 2010 18:59:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Jan 2010 18:59:05 -0000 Received: (qmail 92230 invoked by uid 500); 24 Jan 2010 18:59:04 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 92156 invoked by uid 500); 24 Jan 2010 18:59:04 -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 92146 invoked by uid 99); 24 Jan 2010 18:59:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Jan 2010 18:59:04 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Jan 2010 18:58:53 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1NZ7fN-0002m3-0f for users@camel.apache.org; Sun, 24 Jan 2010 10:58:33 -0800 Message-ID: <27297981.post@talk.nabble.com> Date: Sun, 24 Jan 2010 10:58:33 -0800 (PST) From: lekkie To: users@camel.apache.org Subject: Re: Aggregator's not returning combined exchanges, only returns last exchange In-Reply-To: <5380c69c1001240501k7dcbab33l59ae9640ae05b907@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: lekkie.aydot@gmail.com References: <27270355.post@talk.nabble.com> <5380c69c1001240501k7dcbab33l59ae9640ae05b907@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org I tried this but it did not work. Something strange however, happens. I noticed if I use the default aggregationStrategy, the log:Response1 will be logged (as null), however if I changed it to myAggregatorStrategy, it never prints the log (let alone log:Response3), instead it prints log:Response2 which prints the old and ne= w exchange separately (at different times). =09 =09 =09 =09=20 =09=09 =09=09 =09true =09=09 =09 =09=09 =20 =09 =09 =20 =09 =09 =09 =09=09 Something is wrong somewhere, just can't figure it out yet. Claus Ibsen-2 wrote: >=20 > Hi >=20 > I have created an unit test which does what you want > http://svn.apache.org/viewvc?rev=3D902559&view=3Drev >=20 > You should use batchSize =3D 2 and not OUIT batch size. OUT batch size > is when you have multiple correlation groups. > Which yo do not have since you use true as the correlation id. >=20 > Also note that the default timeout of 1 sec will kick in, so if you > send in message in slow pace then set it to a higher number. >=20 > The aggregator will be overhauled in the future, hopefully in 2.3 >=20 >=20 > On Fri, Jan 22, 2010 at 10:05 AM, lekkie wrote: >> >> Hi, >> >> I want to combine messages from 2 different exchanges into a single >> exchange, from the EIP patterns aggregation strategy seems to be right >> pattern to use. >> >> However, after reading the doc (http://camel.apache.org/aggregator.html)= , >> I >> followed the instructns but my aggregation strategy only returns the las= t >> exchange, even though I specifically configured it to send messages only >> when the outbatchsize is 2. >> >> I implemented a custom aggregationstrategy with shoulld combine my >> exchanges >> into one. I log the event in the class and it works fine, what is beyond >> me >> is why it returns only the last exchange. >> >> >> See my config here: >> > class=3D"org.tempuri.MyAggregationStrategy"/> >> >> > trace=3D"true"> >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 >> >> >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0true >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 >> >> >> =C2=A0 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 >> >> >> >> log:Response only print out response from > uri=3D"nmr:{http://services.locator/}Service:ServicesPort"/>. >> >> Meanwhile, the log inside myStratRef (myAggregatorStrategy), which I ask >> to >> concatenate the old & new exchanges shows both exchanges were >> concatenated. >> How do I get this concatenated exchange to be sent (to log:Resposne)? >> >> Regards. >> -- >> View this message in context: >> http://old.nabble.com/Aggregator%27s-not-returning-combined-exchanges%2C= -only-returns-last-exchange-tp27270355p27270355.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> >=20 >=20 >=20 > --=20 > Claus Ibsen > Apache Camel Committer >=20 > Author of Camel in Action: http://www.manning.com/ibsen/ > Open Source Integration: http://fusesource.com > Blog: http://davsclaus.blogspot.com/ > Twitter: http://twitter.com/davsclaus >=20 >=20 --=20 View this message in context: http://old.nabble.com/Aggregator%27s-not-retu= rning-combined-exchanges%2C-only-returns-last-exchange-tp27270355p27297981.= html Sent from the Camel - Users mailing list archive at Nabble.com.