Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 45A10F832 for ; Tue, 13 Aug 2013 11:58:52 +0000 (UTC) Received: (qmail 90967 invoked by uid 500); 13 Aug 2013 11:58:51 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 90056 invoked by uid 500); 13 Aug 2013 11:58:50 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 89543 invoked by uid 99); 13 Aug 2013 11:58:49 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Aug 2013 11:58:49 +0000 Date: Tue, 13 Aug 2013 11:58:49 +0000 (UTC) From: "Tommaso Schiavinotto (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CAMEL-6632) Camel-kestrel consumer do not shutdown because of (not existing) inflight exchanges MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Tommaso Schiavinotto created CAMEL-6632: ------------------------------------------- Summary: Camel-kestrel consumer do not shutdown because of (not existing) inflight exchanges Key: CAMEL-6632 URL: https://issues.apache.org/jira/browse/CAMEL-6632 Project: Camel Issue Type: Bug Components: extra Affects Versions: 2.11.1 Environment: Mac OS X and Debian Reporter: Tommaso Schiavinotto *** camel-kestrel missing from component list *** I've a Camel process (that I run from command line) which route is similar to this one: public class ProfilerRoute extends RouteBuilder { @Override public void configure() { from("kestrel://my_queue?concurrentConsumers=10&waitTimeMs=500") .unmarshal().json(JsonLibrary.Jackson, MyClass.class) .process(new Processor() { @Override public void process(Exchange exchange) throws Exception { /* Do the real processing [...] */ exchange.getIn().setBody(null); } }) .filter(body().isNotNull()) .to("file://nowhere"); } } Note that I'm trashing whatever message after having processed it, being this a pure consumer process. The process is run by its own. No other process is writing on the queue, the queue is empty. However when I try to kill the process the process is not going to die. >From the logs I see the following lines (indented for readability): [ Thread-1] MainSupport$HangupInterceptor INFO Received hang up - stopping the main instance. [ Thread-1] MainSupport INFO Apache Camel stopping [ Thread-1] GuiceCamelContext INFO Apache Camel 2.11.1 (CamelContext: camel-1) is shutting down [ Thread-1] DefaultShutdownStrategy INFO Starting to graceful shutdown 1 routes (timeout 300 seconds) [l-1) thread #12 - ShutdownTask] DefaultShutdownStrategy INFO Waiting as there are still 10 inflight and pending exchanges to complete, timeout in 300 seconds. And so on with decreasing timeout. At the end of the timeout I get on the logs: [l-1) thread #12 - ShutdownTask] DefaultShutdownStrategy INFO Waiting as there are still 10 inflight and pending exchanges to complete, timeout in 1 seconds. [ Thread-1] DefaultShutdownStrategy WARN Timeout occurred. Now forcing the routes to be shutdown now. [l-1) thread #12 - ShutdownTask] DefaultShutdownStrategy WARN Interrupted while waiting during graceful shutdown, will force shutdown now. [ Thread-1] KestrelConsumer INFO Stopping consumer for kestrel://localhost:22133/my_queue?concurrentConsumers=10&waitTimeMs=500 But the process will not die anyway (even if I try to kill it at this point). I would have expected that after the waiting time all the threads would realise that a shutdown is going on and stop. I've read the "Graceful Shutdown" document, however I could not find something that explains the behaviour I'm facing. As you can see from logs I'm using the 2.11.1 version of Apache Camel. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira