Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 38127 invoked from network); 26 Feb 2008 02:02:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Feb 2008 02:02:32 -0000 Received: (qmail 26762 invoked by uid 500); 26 Feb 2008 02:02:27 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 26740 invoked by uid 500); 26 Feb 2008 02:02:27 -0000 Mailing-List: contact camel-user-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-user@activemq.apache.org Delivered-To: mailing list camel-user@activemq.apache.org Received: (qmail 26731 invoked by uid 99); 26 Feb 2008 02:02:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2008 18:02:27 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of willem.jiang@gmail.com designates 209.85.162.180 as permitted sender) Received: from [209.85.162.180] (HELO el-out-1112.google.com) (209.85.162.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Feb 2008 02:01:51 +0000 Received: by el-out-1112.google.com with SMTP id j27so1617820elf.0 for ; Mon, 25 Feb 2008 18:02:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; bh=HZPPnmyhdL+s0itL0EbpYbeVvkQ78icG7F9R1hOCync=; b=Hg8Vs7t+IUbFPZVmhsCqQGKKVYLiJu0H0IXXBMvozaYl+odXZtu8+4YF2zW271ZyFsNt3rs8N1uIlUV+528KWrUj4E5PIz+3FPyVAbe0ypD/1zu7le2ZVEA9rKfFXdqUieTtu3DivsaYujlV/P20DJ0WKoAi/7VjS14e9MfLNmc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=sUYiZzJA9OrdVetxGEZ1F8KS2BQ6XRpYVs21h+7cWAQQP7RNk/0L4b+19voLp7WkctN5abQ6jX1x7S1hMhcIJ+N98XDaAp5LzPvbRjRe8np0nIr0x7TrHlKwc1znWRwaJqiTktYg/OQOzXSWSCu2Ba5B5WBsHgSAre7kMseBAO0= Received: by 10.115.108.1 with SMTP id k1mr4601942wam.141.1203991319725; Mon, 25 Feb 2008 18:01:59 -0800 (PST) Received: from ?192.168.0.182? ( [221.223.254.149]) by mx.google.com with ESMTPS id k26sm10698966waf.8.2008.02.25.18.01.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 25 Feb 2008 18:01:58 -0800 (PST) Message-ID: <47C372F6.4030601@gmail.com> Date: Tue, 26 Feb 2008 10:01:26 +0800 From: Willem Jiang User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: camel-user@activemq.apache.org Subject: Re: Parallel processing route References: <15642110.post@talk.nabble.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I have a question about the thread pool DSL. If we put throw the rest processors into the thread pool , dose it mean the processor can parallel running ? If so , the aggregator could be a critical area for multi-thread accessing. BTW, AFAIK the cxf consumer is using the thread pool to handle the request, that is one thread per request. For aswin's case , How about ? from("cxf:bean:soapMessageEndpoint").multicast(new BodyOutAggregatingStrategy()).thread(3).to("direct:webservice1", "direct:webservice2", "direct:webService3"); from("direct:webservice1").to("cxf://webservice1"); from("direct:webservice2").to("cxf://webservice2"); from("direct:webservice3").to("cxf://webservice3"); Willem. Hiram Chirino wrote: > Instead of using seda.. use direct so that the call does not return > that that point. Also try throwing in a thread(maxSize) to allocate a > thread pool to concurrently > execute the rest of the pipeline. For example: > > from("cxf:bean:soapMessageEndpoint").process(myProc).thread(5).to("direct:a"); > from("direct:a").aggregator(header("txid"), > aggregationStratergy).to("bean:testBean?methodName=processSOAP") ; > > Regards, > Hiram > > On Fri, Feb 22, 2008 at 6:52 PM, aswin.nair wrote: > >> I have a scenario where a Camel CXF consumer receives SOAP/XML messages and >> routes through Camel. The processing is completely synchronous and uses >> In/Out model where a response has to be generated for the request and >> currently things are working fine. We call multiple data providers (through >> SOAP/Http) in the route and for performance reasons I want these to be >> parallel and when the response comes back from these aggregate them to one >> message and continue processing. >> In short i want to achieve the following >> >> CFX Consumer -> Route ---> parallelly send messages and recieve responses >> ---> aggregate response --> further process ----> return >> >> A simple route like does not work in the CXF case as the seda is >> asynchronous and causes the call to return to the CXF consumer immediately >> after the invocation. The results from the seda a are processed, but are not >> send back to the CXF Consumer >> >> from("cxf:bean:soapMessageEndpoint").process(myProc).to("seda:a"); >> >> from("seda:a").aggregator(header("txid"), aggregationStratergy) >> .to("bean:testBean?methodName=processSOAP") ; >> >> Is there any way we can parallelize the execution and aggregate the output >> and continue processing especially in the IN/OUT way using CXF consumer? >> Please advice. >> >> >> -- >> View this message in context: http://www.nabble.com/Parallel-processing-route-tp15642110s22882p15642110.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> >> > > > >