Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 34776 invoked from network); 23 Feb 2010 16:44:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Feb 2010 16:44:31 -0000 Received: (qmail 98272 invoked by uid 500); 23 Feb 2010 16:44:31 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 98252 invoked by uid 500); 23 Feb 2010 16:44:31 -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 98242 invoked by uid 99); 23 Feb 2010 16:44:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Feb 2010 16:44:31 +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 (athena.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; Tue, 23 Feb 2010 16:44:22 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Njxrd-0005EB-H3 for users@camel.apache.org; Tue, 23 Feb 2010 08:44:01 -0800 Message-ID: <27706374.post@talk.nabble.com> Date: Tue, 23 Feb 2010 08:44:01 -0800 (PST) From: wmoussel To: users@camel.apache.org Subject: Re: Using Concurrent Consumers within a splitter In-Reply-To: <5380c69c1002230833l4f071026p91773513036a6cba@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: wmoussel@gmail.com References: <27705170.post@talk.nabble.com> <5380c69c1002230833l4f071026p91773513036a6cba@mail.gmail.com> So you mean my direct:processFile and direct:processLine are multi-threaded or I have to put a thread(10) somewhere? It looks to me that it's processing one file at a time. Is it just an illusion? Thanks Claus Ibsen-2 wrote: >=20 > Hi >=20 > direct can easily be concurrent. Just see direct as if it was a direct > method call that is invoked in the same thread. > So if you got 10 different threads that concurrently route over direct > then you got concurrency. >=20 > Its only SEDA which uses a buffer in between (in fact its a Queue) > which is used to transfer the data from on thread to another. >=20 >=20 > On Tue, Feb 23, 2010 at 4:34 PM, wmoussel wrote: >> >> Hi, >> >> I'm basically trying to achieve this: >> >> from("file:input?move=3Doutput").loadBalance().to("direct:Q1","direct:Q2= ","direct:Q3") >> >> from("direct:Q1").setHeader("queue",constant("Q1")).to("direct:processFi= le") >> from("direct:Q2").setHeader("queue",constant("Q2")).to("direct:processFi= le") >> from("direct:Q3").setHeader("queue",constant("Q3")).to("direct:processFi= le") >> >> from("direct:processFile").split(body(),myConcatenateLinesStrategy).para= llelProcessing() >> =C2=A0.process(...) >> =C2=A0[...] >> =C2=A0.to("direct:processLine") >> .end() >> .process(myEndOfProcessingFileProcessor) >> // Only Now move file to output >> ; >> >> I think there is no point of having : >> - parallelProcessing on the splitter since i'm using >> to("direct:processLine") which runs one only thread >> - loadBalance since they all point to the same direct >> >> And if I use seda?concurrentConsumers=3D10 instead, the file is moved >> before >> it's processed (UnitOfWork stops at to("seda:") I think) ... >> >> From what I get of thread(10) it wouldn't help either because the >> exchange >> wouldn't get to the myEndOfProcessingFileProcessor part >> >> Why is there no way to have direct?concurrentConsumers=3D10 ? Or Am I >> missing >> something ? >> >> Thanks a lot ! >> >> Wandrille >> >> -- >> View this message in context: >> http://old.nabble.com/Using-Concurrent-Consumers-within-a-splitter-tp277= 05170p27705170.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/Using-Concurrent-Consum= ers-within-a-splitter-tp27705170p27706374.html Sent from the Camel - Users mailing list archive at Nabble.com.