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 D5D011839A for ; Thu, 14 Jan 2016 09:58:29 +0000 (UTC) Received: (qmail 66019 invoked by uid 500); 14 Jan 2016 09:58:29 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 65974 invoked by uid 500); 14 Jan 2016 09:58:29 -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 65962 invoked by uid 99); 14 Jan 2016 09:58:28 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jan 2016 09:58:28 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 69985C17C7 for ; Thu, 14 Jan 2016 09:58:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.9 X-Spam-Level: * X-Spam-Status: No, score=1.9 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=1, KAM_LIVE=1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 3TpPN8WwT9iB for ; Thu, 14 Jan 2016 09:58:17 +0000 (UTC) Received: from mail-ig0-f194.google.com (mail-ig0-f194.google.com [209.85.213.194]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id BF9EA31AC4 for ; Thu, 14 Jan 2016 09:58:16 +0000 (UTC) Received: by mail-ig0-f194.google.com with SMTP id ik10so19656562igb.1 for ; Thu, 14 Jan 2016 01:58:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:message-id:in-reply-to:references:subject :mime-version:content-type:content-transfer-encoding :content-disposition; bh=57PUghB9a+FFZqGm+x5mKRnNHANYoBAkpqyhubOQ8RM=; b=SJri0qAF+JoC5DLpHaqSP0I1oTaIVvn8enH6Z9ZK7sfBmuXw/MwREQwWBlGMLXX+PC wgedlvC4668nCmfRgTxOEWIk9MjnbNc/4o1HXl4mGXNXMw9yj+IOv19wf0xgTheyH69t 9tbFQy2/vjGbB/O+nXCffjElQZAL36Gs+iU9X1jcBqUh1crtfdzI6o1EAGzFH+wJDf95 QfiqvOwMvPwTGtapPsrGFwZvYzjO8V7Yfqlck6Fn37cCQ1cWsrwbmIqH+DeAQu7EIyi6 eFeK+kwmBwifHAkoOM63bJBsbmp17qVpgqs4bP7HAevpzc9aqNKzvYsj7ZQ6DDIWbsyL gdEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to :references:subject:mime-version:content-type :content-transfer-encoding:content-disposition; bh=57PUghB9a+FFZqGm+x5mKRnNHANYoBAkpqyhubOQ8RM=; b=BOytMT8dHru5XFA0slv5DzuQ8TVZCtteunc04BpU62fRmcE5MHd5318rUzvnU3P4rz gVP6Ei9O2AioDYQivfKf9YOrIL64Wz3EkTMgGGtWa7WVeyXhumVF4m4yPhvqs94af5vu SM/aGGQRtU3eKD+MDFGgSInPXchCkfe/uKm4ut3a9gERg8wsALuAEGq5fcbNgNpx78Nn tj06WJveG2JyuycKDhv7Vjw9dCD0C5qeBpwitTsrRiKpL3izqVoPcL86RwhMxPG5tofc R5P+CZGlbvQKuoS2u8wGi5L0c3Y3wB0M7HfR9PjTe4WZD2iHncICXkF3QAeiUjVy3bEo 8Ikw== X-Gm-Message-State: ALoCoQmO2uZWpnCysXUn6IUaMvD54wgkXfb4kCpdqWXNs4R39vnKbwyXCdikRwGquGm7kAl77tWvyz2rFbtj1/Bhjxks7eHlOA== X-Received: by 10.50.61.243 with SMTP id t19mr3615980igr.86.1452765489933; Thu, 14 Jan 2016 01:58:09 -0800 (PST) Received: from JiangNingMacBookPro ([61.148.202.186]) by smtp.gmail.com with ESMTPSA id h19sm9581598igq.6.2016.01.14.01.58.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jan 2016 01:58:03 -0800 (PST) Date: Thu, 14 Jan 2016 17:57:58 +0800 From: Willem Jiang To: Charles Moulliard Cc: users@camel.apache.org Message-ID: In-Reply-To: References: Subject: Re: Issue with maximumPoolSize & Netty4-http component X-Mailer: Airmail (335) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Charles, I just created a JIRA=5B1=5D for it and will back port the patch=C2=A0CAM= EL-8031 to camel-netty4 shortly. =5B1=5Dhttps://issues.apache.org/jira/browse/CAMEL-9514=C2=A0 -- =20 Willem Jiang Blog: http://willemjiang.blogspot.com (English) =20 http://jnn.iteye.com (Chinese) Twitter: willemjiang =20 Weibo: =E5=A7=9C=E5=AE=81willem On January 14, 2016 at 3:43:27 PM, Charles Moulliard (ch007m=40gmail.com)= wrote: > The workaround only work for the netty4-http but not when we use it wit= h > the Rest DSL > =20 > This syntax > =20 > =40Override > public void configure() throws Exception =7B > // configure to use netty4-http on localhost with the given > port > restConfiguration() > .component(=22netty4-http=22) > .host(=22localhost=22).port(getPort()) > .endpointProperty(=22nettyHttpBinding=22, =22=23mybinding=22) > .componentProperty(=22maximumPoolSize=22,=222=22); > =20 > // use the rest DSL to define the rest services > rest(=22/users/=22) > .get(=22=7Bid=7D/basic=22) > .route() > .log(=22>> Thread name : =24=7BthreadName=7D=22) > =20 > will continue to use 16 Threads when we send concurrently 20 messages > =20 > On Thu, Jan 14, 2016 at 8:26 AM, Charles Moulliard wrote: > =20 > > Hi Willem, > > > > Thx for your input. I have fixed my problem by setting the parameter = on > > the component itself > > > > public void configure() throws Exception =7B > > > > NettyHttpConfiguration nettyConfig =3D new > > NettyHttpConfiguration(); > > nettyConfig.setMaximumPoolSize(2); > > NettyHttpComponent nettyHttp =3D new NettyHttpComponent(); > > nettyHttp.setConfiguration(nettyConfig); > > > > getContext().addComponent(=22netty4-http=22, nettyHttp); > > nettyHttp.start(); > > > > // expose a echo service > > from(=22netty4-http:http://localhost:=7B=7Bport=7D=7D/echo=22) > > .log(=22>> Thread name : =24=7BthreadName=7D=22) > > > > .transform(body().append(body())).to(=22mock:result=22); > > =7D > > > > Only 2 threads are created now > > > > Regards, > > > > Charles > > > > On Thu, Jan 14, 2016 at 2:33 AM, Willem Jiang =20 > > wrote: > > > >> Hi Charles, > >> > >> You should be able to setup the maximumPoolSize on the Netty4-http > >> component level due to CAMEL-8031=5B1=5D. > >> And the maximumPoolSize only works for consumer side. > >> > >> =5B1=5Dhttps://issues.apache.org/jira/browse/CAMEL-8031 > >> > >> -- > >> Willem Jiang > >> > >> > >> Blog: http://willemjiang.blogspot.com (English) > >> http://jnn.iteye.com (Chinese) > >> Twitter: willemjiang > >> Weibo: =E5=A7=9C=E5=AE=81willem > >> > >> > >> > >> On January 14, 2016 at 1:09:04 AM, Charles Moulliard (ch007m=40gmail= .com) > >> wrote: > >> > Hi, > >> > > >> > When I debug this unit test > >> > https://gist.github.com/cmoulliard/123261f7ac2a9d5c719c, the Camel= > >> Netty4 > >> > HTTP Endpoint is well created with the param =22maximumPoolSize=3D= 2=22 > >> > > >> > main TRACE =5Borg.apache.camel.impl.DefaultComponent=5D - Creating= endpoint > >> > uri=3D=5Bnetty4-http://http://localhost:26025/echo=3FmaximumPoolSi= ze=3D2=5D, > >> path=3D=5B > >> > http://localhost:26025/echo=5D, parameters=3D=5B=7BmaximumPoolSize= =3D2=7D=5D > >> > > >> > but the number of threads reported by Netty is still bigger than 2= > >> > > >> > Camel (camel-1) thread =234 - NettyEventExecutorGroup IN=46O =5Bro= ute1=5D - >> > >> > Thread name : Camel (camel-1) thread =234 - NettyEventExecutorGrou= p > >> > Camel (camel-1) thread =233 - NettyEventExecutorGroup IN=46O =5Bro= ute1=5D - >> > >> > Thread name : Camel (camel-1) thread =233 - NettyEventExecutorGrou= p > >> > Camel (camel-1) thread =232 - NettyEventExecutorGroup IN=46O =5Bro= ute1=5D - >> > >> > Thread name : Camel (camel-1) thread =232 - NettyEventExecutorGrou= p > >> > Camel (camel-1) thread =231 - NettyEventExecutorGroup IN=46O =5Bro= ute1=5D - >> > >> > Thread name : Camel (camel-1) thread =231 - NettyEventExecutorGrou= p > >> > Camel (camel-1) thread =230 - NettyEventExecutorGroup IN=46O =5Bro= ute1=5D - >> > >> > Thread name : Camel (camel-1) thread =230 - NettyEventExecutorGrou= p > >> > Camel (camel-1) thread =234 - NettyEventExecutorGroup IN=46O =5Bro= ute1=5D - >> > >> > Thread name : Camel (camel-1) thread =234 - NettyEventExecutorGrou= p > >> > Camel (camel-1) thread =233 - NettyEventExecutorGroup IN=46O =5Bro= ute1=5D - >> > >> > Thread name : Camel (camel-1) thread =233 - NettyEventExecutorGrou= p > >> > Camel (camel-1) thread =234 - NettyEventExecutorGroup IN=46O =5Bro= ute1=5D - >> > >> > Thread name : Camel (camel-1) thread =234 - NettyEventExecutorGrou= p > >> > Camel (camel-1) thread =230 - NettyEventExecutorGroup IN=46O =5Bro= ute1=5D - >> > >> > Thread name : Camel (camel-1) thread =230 - NettyEventExecutorGrou= p > >> > Camel (camel-1) thread =232 - NettyEventExecutorGroup IN=46O =5Bro= ute1=5D - >> > >> > Thread name : Camel (camel-1) thread =232 - NettyEventExecutorGrou= p > >> > > >> > Do I have to use another param to set the ThreadPool used by > >> Netty4-http =3F > >> > > >> > > >> > Regards, > >> > > >> > -- > >> > Charles Moulliard > >> > Apache Committer & PMC / Architect =40RedHat > >> > Twitter : =40cmoulliard =7C Blog : http://cmoulliard.github.io > >> > > >> > >> > > > > > > -- > > Charles Moulliard > > Apache Committer & PMC / Architect =40RedHat > > Twitter : =40cmoulliard =7C Blog : http://cmoulliard.github.io > > > > > =20 > =20 > -- > Charles Moulliard > Apache Committer & PMC / Architect =40RedHat > Twitter : =40cmoulliard =7C Blog : http://cmoulliard.github.io > =20