Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F30CADCE3 for ; Tue, 19 Jun 2012 11:23:49 +0000 (UTC) Received: (qmail 37230 invoked by uid 500); 19 Jun 2012 11:23:49 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 37127 invoked by uid 500); 19 Jun 2012 11:23:49 -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 37095 invoked by uid 99); 19 Jun 2012 11:23:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2012 11:23:48 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.217.173 as permitted sender) Received: from [209.85.217.173] (HELO mail-lb0-f173.google.com) (209.85.217.173) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2012 11:23:44 +0000 Received: by lbok6 with SMTP id k6so776580lbo.32 for ; Tue, 19 Jun 2012 04:23:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=hd/9/RF3iHjXy55R5R07cmglTuK3vii7KKRX/+/ZdIo=; b=tIacyFVCXGuLNU+i5nzCDMJET2HoPhg8slcgv85UuGYAYSesRlRR4ny4/N9y886ZJG M1R5KIx0USitbZw2SLj+tqQ7Ejr5xn9t59OBE3lg/Ochbp5kGYWF+lFlaY1n0I7Z0Pnw 8cVEjRWde0cZzR5s/zuiSAa5l+fbqGtDnasV+ukcTO1FbiiEBlokCyNdNBmUfNjOxLkJ SXMWNmIsU8TpOrozPiHUUm+Vv6/MqvxDZkEvo/eSy6RBzAsadlOsIezWRBLM03+G4LWu qm3Ab3alXeBo22o12RqOWdE5iCUUL7nygJ0yXffbwBp6LCw8iCAAhB6pOH9jAP30K3Uc cudw== Received: by 10.112.43.37 with SMTP id t5mr8217377lbl.89.1340105002602; Tue, 19 Jun 2012 04:23:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.49.73 with HTTP; Tue, 19 Jun 2012 04:23:02 -0700 (PDT) In-Reply-To: References: <1340046115271-5714635.post@n5.nabble.com> From: Claus Ibsen Date: Tue, 19 Jun 2012 13:23:02 +0200 Message-ID: Subject: Re: Asynchronous behavior of SEDA queue? To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Jun 19, 2012 at 12:50 PM, csete wrote: > Claus, > > I believe that that is what I'm doing? =A0Here is the route as XML, dumpe= d > from the route object in JMX: > > id=3D"route_request_handler_tmb" xmlns=3D"http://camel.apache.org/schema/= spring > "> > =A0 =A0 uri=3D"seda:request_handler_tmb?concurrentConsumers=3D10&timeout=3D60= 000&size=3D100"/> > =A0 =A0 > =A0 =A0 > > > Any thoughts would be appreciated. > Thanks, > Craig Look at the producer side which sends the message to the seda queue. It may not be quick enough, or if you do request/reply over SEDA, then the producer will at some point await for the exchange to be done, so it can get the result message. It depends a bit how you are doing this (sending to the seda queue). See the waitForTaskToComplete option http://camel.apache.org/seda > > > On Tue, Jun 19, 2012 at 4:08 AM, Claus Ibsen-2 [via Camel] < > ml-node+s465427n5714662h44@n5.nabble.com> wrote: > >> Hi >> >> The concurrentConsumers option should be configured on the consumer side= , >> eg >> >> from("seda:foo?concurrentConsumers=3D20") >> =A0 ... >> >> >> >> >> On Mon, Jun 18, 2012 at 9:01 PM, csete <[hidden email]> >> wrote: >> >> > I'm struggling to understand SEDA queue behavior in terms of >> asynchronous >> > behavior. =A0My understanding from the documentation is that if >> > "concurrentConsumers > 1" it should spawn multiple threads to handle >> > requests. =A0However, it doesn't seem like this is currently working >> correctly >> > and I'm sure that I'm missing something stupid. >> > >> > I have a route that is configured to route >> > >> "seda://request_handler_tmb?concurrentConsumers=3D10&size=3D100&timeout= =3D60000" >> > to a handler bean. =A0There is a single instance of that bean (if that >> > matters). =A0My logging shows that while the thread that does the (InO= ut) >> > request handling changes from one request to the next, that there is >> only >> > one outstanding request at a time. =A0The request handling is currentl= y >> wired >> > to our test harness which is intentionally delaying responses for 20 >> > seconds... in which case, I would expect to see multiple threads >> > outstanding. >> > >> > 2012-06-18 13:44:58,070 DEBUG [ProcessorBean] (Camel >> > (context_request_handler) thread #56 - seda://request_handler_tmb) >> > Processing request for exchange: ID-seteramac-56604-1340045015657-5-68 >> > 2012-06-18 13:44:58,127 DEBUG [ProcessorBean] (Camel >> > (context_request_handler) thread #56 - seda://request_handler_tmb) >> > Successfully processed request for exchange: >> > ID-seteramac-56604-1340045015657-5-68 >> > 2012-06-18 13:45:01,295 DEBUG [ProcessorBean] (Camel >> > (context_request_handler) thread #53 - seda://request_handler_tmb) >> > Processing request for exchange: ID-seteramac-56604-1340045015657-5-74 >> > 2012-06-18 13:45:01,340 DEBUG [ProcessorBean] (Camel >> > (context_request_handler) thread #53 - seda://request_handler_tmb) >> > Successfully processed request for exchange: >> > ID-seteramac-56604-1340045015657-5-74 >> > >> > Can anyone point me in the right direction on this? =A0I'm assuming th= is >> is >> > something that I'm doing wrong since I can see the executor service co= de >> in >> > the SEDA source code, but it is definitely not behaving as I would >> expect it >> > to behave. >> > >> > Thanks, >> > Craig >> > >> > >> > >> > >> > >> > -- >> > View this message in context: >> http://camel.465427.n5.nabble.com/Asynchronous-behavior-of-SEDA-queue-tp= 5714635.html >> > Sent from the Camel - Users mailing list archive at Nabble.com. >> >> >> >> -- >> Claus Ibsen >> ----------------- >> FuseSource >> Email: [hidden email] >> Web: http://fusesource.com >> Twitter: davsclaus, fusenews >> Blog: http://davsclaus.com >> Author of Camel in Action: http://www.manning.com/ibsen >> >> >> ------------------------------ >> =A0If you reply to this email, your message will be added to the discuss= ion >> below: >> >> http://camel.465427.n5.nabble.com/Asynchronous-behavior-of-SEDA-queue-tp= 5714635p5714662.html >> =A0To unsubscribe from Asynchronous behavior of SEDA queue?, click here<= http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=3Dunsubscr= ibe_by_code&node=3D5714635&code=3DY3JhaWdAbWZvdW5kcnkuY29tfDU3MTQ2MzV8MTg4N= DU5NTQ1Mw=3D=3D> >> . >> NAML >> > > > > -- > Craig Setera > Director, Product Engineering > mFoundry > p 415.324.5801 > craig@mfoundry.com > > > -- > View this message in context: http://camel.465427.n5.nabble.com/Asynchron= ous-behavior-of-SEDA-queue-tp5714635p5714663.html > Sent from the Camel - Users mailing list archive at Nabble.com. --=20 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