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 2606B95B4 for ; Wed, 9 May 2012 06:51:13 +0000 (UTC) Received: (qmail 95285 invoked by uid 500); 9 May 2012 06:51:12 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 95176 invoked by uid 500); 9 May 2012 06:51:12 -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 95168 invoked by uid 99); 9 May 2012 06:51:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 May 2012 06:51:12 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.217.173 as permitted sender) Received: from [209.85.217.173] (HELO mail-lb0-f173.google.com) (209.85.217.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 May 2012 06:51:07 +0000 Received: by lbok6 with SMTP id k6so5983642lbo.32 for ; Tue, 08 May 2012 23:50:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=EVWBHsUdsLohMkjN1dw/ku9GBB0LlT6NAQS6vBKVmPk=; b=VNos4Pz0c7kBJY5nKiTxt5ABZl9Z94ufAGdmfmHT60AbnwUowca+2BZkMiqFHBGdjD 3dIPbCBTTxjsqv9refPVoqZHA5CGa6eiXYu85qMB4OXEHtbRFirxPd8oz2XuoPNfIUT9 GAOO4LnoObNVDfUrtHM8iSl0OVxOf32BT3YzqaqiYL/Jf751aU0Hn1AQmfjUz2BHz8bw EkdDs9ItoCAkw1DiPjusPTlhvHaBx7qRFJy4J3yAY5Ivknf5CcvhgE0Fe+yz4kWBHSuo EcNqq9UtQJjtMHFnvTEmoGL+ojMSc39HxJXxILUFunwzeMQwRUHaBEBOjTHbCBT66q5x NNWw== Received: by 10.112.45.226 with SMTP id q2mr7087885lbm.50.1336546246091; Tue, 08 May 2012 23:50:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.146.7 with HTTP; Tue, 8 May 2012 23:50:25 -0700 (PDT) In-Reply-To: References: From: Claus Ibsen Date: Wed, 9 May 2012 08:50:25 +0200 Message-ID: Subject: Re: Graceful shutdown with drain stopping To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Wed, May 9, 2012 at 8:13 AM, Thomas Johansen wrote: > Hi, > > I've been looking at the shutdown strategy support, but can't find a way to > drain stop my routes. > > I.e. I have an application with several Mina TCP and Jetty consumer routes. > When shutting down the first thing I want to happen is that these routes > stop consuming any more messages which in practice means that their > listening sockets are unbound. THEN I want the current inflight exchanges > to complete before shutdown. > This should happen currently. The consumer is being shutdown first. Then the in flight messages is being processed, and when no more messages then the shutdown is complete. Do you see something else? You can enable DEBUG logging at the org.apache.camel.impl.DefaultShutdownStrategy and see what it logs. > Is this easily achievable without too much custom code? I guess this > problem goes for all routes which are not polling consumers... > > Takk, > Thomas -- Claus Ibsen ----------------- CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com FuseSource Email: cibsen@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/