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 3B801989D for ; Tue, 13 Mar 2012 14:20:46 +0000 (UTC) Received: (qmail 83334 invoked by uid 500); 13 Mar 2012 14:20:45 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 83306 invoked by uid 500); 13 Mar 2012 14:20:45 -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 Delivered-To: moderator for users@camel.apache.org Received: (qmail 77514 invoked by uid 99); 13 Mar 2012 14:19:14 -0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 216.139.236.26 is neither permitted nor denied by domain of shlomijava@gmail.com) Date: Tue, 13 Mar 2012 07:18:48 -0700 (PDT) From: ShlomiJ To: users@camel.apache.org Message-ID: <1331648328693-5561055.post@n5.nabble.com> In-Reply-To: References: <1331560677086-5557827.post@n5.nabble.com> <1331626392819-5560267.post@n5.nabble.com> Subject: Re: WireTap threads number keeps on growing MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Claus Ibsen-2 wrote > When you provide an existing thread pool to any Camel EIPs, such as > the WireTap, then > YOU are in control of the lifecycle of the thread pool. So you have to > shutdown this thread pool yourself, > when its no longer in-use. I understand your point about the life cycle. But I have a problem with the *executorServiceRef*. I use executorServiceRef(WIRETAP_THREADPOOL), the thread pool (TP) is at the registry, and I'm in control of its life cycle. But actually each call to *wireTap creates its own TP*, NOT using the one from the registry. I would expect executorServiceRef to use the TP it is giving, not create a new TP. It will also allow me to use the registry-key to get hold of the TP and release it. ShlomiJ wrote > ThreadPoolBuilder tpBuilder = new ThreadPoolBuilder(this.context); > ExecutorService wiretapThreadpool = > tpBuilder.poolSize(1).maxPoolSize(1).maxQueueSize(1).build("WireTap"); > registry.put(WIRETAP_THREADPOOL, wiretapThreadpool); BTW, I also checked it with /registry.put(WIRETAP_THREADPOOL, java.util.concurrentExecutors.newCachedThreadPool())/ (in case there was something wrong with the way I used the ThreadPoolBuilder). In anyway, in that particular place (many quartz-routes that are removed and created again) I switch for using multicast. thanks for the help SJ -- View this message in context: http://camel.465427.n5.nabble.com/WireTap-threads-number-keeps-on-growing-tp5557827p5561055.html Sent from the Camel - Users mailing list archive at Nabble.com.