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 C845E1172F for ; Wed, 16 Jul 2014 13:19:13 +0000 (UTC) Received: (qmail 20444 invoked by uid 500); 16 Jul 2014 13:19:13 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 20392 invoked by uid 500); 16 Jul 2014 13:19:13 -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 20374 invoked by uid 99); 16 Jul 2014 13:19:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Jul 2014 13:19:13 +0000 X-ASF-Spam-Status: No, hits=3.0 required=5.0 tests=FORGED_YAHOO_RCVD,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 216.139.236.26 is neither permitted nor denied by domain of cristisor_ac@yahoo.com) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Jul 2014 13:19:11 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1X7P6c-0006xc-0a for users@camel.apache.org; Wed, 16 Jul 2014 06:18:46 -0700 Date: Wed, 16 Jul 2014 06:18:46 -0700 (PDT) From: cristisor To: users@camel.apache.org Message-ID: <1405516726011-5753919.post@n5.nabble.com> Subject: Camel + ActiveMQ shutdown timeout problem MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hello, We are using ServiceMix as a container, with an embedded ActiveMQ broker and some Camel routes deployed as JBI service assemblies. ServiceMix is registered as a Windows service, so when the server machine shuts down, the service is also shut down. The current timeout set on ServiceMix is 10 seconds, so if all the components can't be shut down before the timeout, they are somehow dropped/discarded. We wouldn't care about this if we didn't have situations when, after a restart with TimeoutException, some messages are not delivered by the broker to the Camel endpoints anymore. They are stuck in kahaDB and until the index is rebuilt or kahaDB is deleted, messages keep accumulating. Some are delivered after the broker is restarted, but not all of them. Our research pointed out the fact that the shutdown of the Camel routes is taking very long, between 20 and 30 seconds, so many times the logging shows how some Camel routes are "preparing to shutdown complete" but there is no "shutdown complete" afterwards. Probably some routes are not even prepared when Windows shuts down. So, if the routes are in the process of shutting down, could this damage the kahaDB or the kahaDB index? I am suspecting that Windows kills all the running threads suddenly, which includes possible threads which are running and updating kahaDB or the index. The default timeout for shutting down a Camel route is 300 seconds, if I lower it to 1 second what could go wrong? My questions is linked with: http://activemq.2283324.n4.nabble.com/Another-NegativeArraySizeException-problem-ActiveMQ-5-5-1-fuse-70-097-td4683082.html Camel version is 2.7.3-fuse-00-89. Many thanks, Cristian. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-ActiveMQ-shutdown-timeout-problem-tp5753919.html Sent from the Camel - Users mailing list archive at Nabble.com.