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 11B3E113BB for ; Tue, 22 Jul 2014 05:33:47 +0000 (UTC) Received: (qmail 49263 invoked by uid 500); 22 Jul 2014 05:33:46 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 49213 invoked by uid 500); 22 Jul 2014 05:33:46 -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 49197 invoked by uid 99); 22 Jul 2014 05:33:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jul 2014 05:33:46 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.223.179 as permitted sender) Received: from [209.85.223.179] (HELO mail-ie0-f179.google.com) (209.85.223.179) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jul 2014 05:33:45 +0000 Received: by mail-ie0-f179.google.com with SMTP id rl12so7785994iec.10 for ; Mon, 21 Jul 2014 22:33:20 -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=BnvVnUvkJtwcg4nNqIVgGyhMHE/LpEHx5GjuenbA4F0=; b=O9IW5x6rh/UCd05A/xyImRnQ+lLBgniSCGOJUX0bC7wpCR48QEYrI9epe/mSSEIAtF 0+RkUlfCOXCo0Bb8oCJaibcLCveo9NOppT4qKXh++rM+Bou4IfqbAf/qpns4xpJZNS6g DbrWTOKut4iYzsIPwvaW2QDNXE5LoNIPm1rtY5IGiaYF8Q0+JyO8BBQ5d6c9o00hG1cd YtjM/fJ0BwgsJK/H8lIlB5zoJ9Flcaza3vReyiEtlkCnSQ/ZkNDCuvqtIHl+IpUXTbPA YTLuubqN2yTBPFOIW2KW1QGKjUiGL5NWXn9rNE2kX19StlCtdjWsrxVzeKzfk8J+Du0j k+9w== X-Received: by 10.50.152.98 with SMTP id ux2mr12572202igb.27.1406007199867; Mon, 21 Jul 2014 22:33:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.11.67 with HTTP; Mon, 21 Jul 2014 22:32:59 -0700 (PDT) In-Reply-To: References: <4e9ce9c99dca43e29c4cd88457a7ef8b@SN2PR07MB078.namprd07.prod.outlook.com> From: Claus Ibsen Date: Tue, 22 Jul 2014 07:32:59 +0200 Message-ID: Subject: Re: seda concurrency when sending messages to another route To: "users@camel.apache.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi No the direct component does not use the MEP. It just continues routing the message. And when its done, it returns back to the route that called it. eg from A -> to B -> to direct C -> to D from direct C -> to E -> to F then when its done at F, then it continues in the 1st route, and goes to D. And then its done at D, there is no more routes, and the consumer at A can send back a reply to whoever called it (if its InOut) or just terminate if its InOnly mode. On Mon, Jul 21, 2014 at 4:03 PM, Robert Rich wrote: > Thanks Claus! > > Is this because it is (as described in the docs) a 'synchronous call to a= nother endpoint'? Does the exchange pattern used in the seda route influe= nce this at all? If it's InOut, does the Out come from the referenced dire= ct route? > > Sorry for all the questions! > > -----Original Message----- > From: Claus Ibsen [mailto:claus.ibsen@gmail.com] > Sent: Monday, July 21, 2014 2:18 AM > To: users@camel.apache.org > Subject: Re: seda concurrency when sending messages to another route > > Hi > > Yes you can break up big routes into multiple routes, and "link" them tog= ether using direct endpoints. > And yes the seda consumer will not pickup a new message while you call ot= her routes using direct. > > On Sun, Jul 20, 2014 at 6:12 PM, Robert Rich wrote: >> Hi folks, >> >> My understanding is that the seda queue is single-threaded by default, p= rimarily by virtue of 'concurrentConsumers' defaulting to '1'. To me this= means that the route will not pull another message off of the queue until = the last one has completed processing. This is my desired behavior. >> >> However, the route is getting quite long, and I'm wondering if it's poss= ible to pass the message to another route while ensuring that the seda cons= umer will not pull another message off of the queue until that 'invoked' ro= ute has completed. I'm assuming this would be done via 'direct', possibly = with a specific exchange pattern applied to one or both routes? >> >> In the case I have in mind, the second/invoked route would end the proce= ssing chain, but is it possible to have such a pattern in the middle of a r= oute as well, such that the message is passed to a route and the output of = that route inserted back into the processing chain of the first route, almo= st like a subroutine? It seems like the enricher pattern could be (ab)used= this way, but it doesn't seem like that is the intent. >> >> Thanks! >> >> Bob >> >> >> -- >> Robert Rich >> CTO/VP >> Global Security Technologies, Inc. >> Direct: (614) 291-3456 >> Fax: (614) 356-8078 >> www.gsti.net >> > > > > -- > Claus Ibsen > ----------------- > Red Hat, Inc. > Email: cibsen@redhat.com > Twitter: davsclaus > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen > hawtio: http://hawt.io/ > fabric8: http://fabric8.io/ --=20 Claus Ibsen ----------------- Red Hat, Inc. Email: cibsen@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/