Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 33988 invoked from network); 1 Jun 2010 13:39:32 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Jun 2010 13:39:32 -0000 Received: (qmail 54471 invoked by uid 500); 1 Jun 2010 13:39:31 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 54428 invoked by uid 500); 1 Jun 2010 13:39:31 -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 54420 invoked by uid 99); 1 Jun 2010 13:39:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jun 2010 13:39:30 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=AWL,FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 74.125.82.45 as permitted sender) Received: from [74.125.82.45] (HELO mail-ww0-f45.google.com) (74.125.82.45) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jun 2010 13:39:26 +0000 Received: by wwb13 with SMTP id 13so570757wwb.32 for ; Tue, 01 Jun 2010 06:39:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=fPEopA4rtEJVyl3h8SOLtXLCKaFPYB9pHWVBNFhczYg=; b=mV6ueGGwHBosCzGiQz9NtoNz4R1HfxFXXI4Gq/qzLX0MfqujlEBAISGwqgjRJc1NDz +QfNckQZIKBsm4dgeKPoRRYtj+S9KUwV5KOTKXvo+5eAg17tMNYidkoXtv0oQjzP18Tg K4vh5q38NQdFgrPb6LkTyexMCqiheTSXQaUD0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=K139ApBmdl/pacc3YO1Mo8VxwMpE+eX2I3I1C2+GK7/G/wEGjOU0cTlvc4LpKGR3bk ivEmwTSjpEZiQgLrmgg+NgOXmOdLcHLT58Xm2EotKFTh1tPqIMpdZ7zm1W7anq6Ilsnl wLEUEawOHuLn/PsMvhEbk4hO8HXeJjqLkQq+U= Received: by 10.227.136.73 with SMTP id q9mr5804709wbt.213.1275399540434; Tue, 01 Jun 2010 06:39:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.6.140 with HTTP; Tue, 1 Jun 2010 06:38:40 -0700 (PDT) In-Reply-To: <28740002.post@talk.nabble.com> References: <28740002.post@talk.nabble.com> From: Claus Ibsen Date: Tue, 1 Jun 2010 15:38:40 +0200 Message-ID: Subject: Re: Route not shutting down on shutdownRoute (1 inflight). To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, Jun 1, 2010 at 12:29 PM, ankelee wrote: > > Hi > > Im trying to create a route that connects to an FTP, downloads the files = and > then shuts down the route afterwards to be triggered again later. > > I thought I had solved it but I keep getting a "Waiting as there are stil= l 1 > inflight and pending exchanges to complete before we can shutdown" messag= e > until timeout. Which exchange could that be, and can I somehow see it? > I have had the though of adding detailed insight to this in the future. Eg from JMX and also in the logs, where you can configure how verbose it should be. For example Camel could detect when an Exchange seems to be stuck and start logging about it and where it appears to be stuck. Feel free to create a ticket in JIRA so we wont forget about this. Also in the future we should have a better DSL for scheduling routes. For example to tell it to run once or repeat etc. And define period using CRON or fixed delays etc. There is already a ticket for this in JIRA. > All the operations works as intended, except the "FtpPollingRoute" never > gets shut down until timeout. > > > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 > > > > =A0 =A0 =A0 =A0 uri=3D"ftp://{{ftp.server}}{{ftp.inbox}}?username=3D{{ftp.user}}&pass= word=3D{{ftp.password}}&move=3Ddone" > /> > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0${property.CamelBa= tchComplete} =3D=3D true > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 > > > > [ssword=3Dcamel123&username=3Dcamel] FtpConsumer =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0INFO > Connected and logged in to: ftp://camel@localhost:21 > [ssword=3Dcamel123&username=3Dcamel] FtpPollingRoute =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0INFO > Fetching =A0CamelinAction (1).pdf > [ssword=3Dcamel123&username=3Dcamel] FtpPollingRoute =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0INFO > CamelinAction (1).pdf copied > [ Camel Thread 1 - OnCompletion] FtpPollingRoute =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0INFO > onComplete =3D =A0false > [ssword=3Dcamel123&username=3Dcamel] FtpPollingRoute =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0INFO > Fetching =A0CamelinAction (2).pdf > [ssword=3Dcamel123&username=3Dcamel] FtpPollingRoute =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0INFO > CamelinAction (2).pdf copied > [ Camel Thread 2 - OnCompletion] FtpPollingRoute =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0INFO > onComplete =3D =A0false > [ssword=3Dcamel123&username=3Dcamel] FtpPollingRoute =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0INFO > Fetching =A0CamelinAction (3).pdf > [ssword=3Dcamel123&username=3Dcamel] FtpPollingRoute =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0INFO > CamelinAction (3).pdf copied > [ Camel Thread 3 - OnCompletion] FtpPollingRoute =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0INFO > onComplete =3D =A0true > [ Camel Thread 3 - OnCompletion] FtpPollingRoute =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0INFO > Stopping > [ Camel Thread 3 - OnCompletion] DefaultShutdownStrategy =A0 =A0 =A0 =A0I= NFO > Starting to graceful shutdown 1 routes (timeout 300 seconds) > [ Camel Thread 4 - ShutdownTask] DefaultShutdownStrategy =A0 =A0 =A0 =A0I= NFO =A0Route: > FtpPollingRoute suspended and shutdown deferred, was consuming from: > Endpoint[ftp://localhost/inbox?move=3Ddone&password=3Dcamel123&username= =3Dcamel] > [ Camel Thread 4 - ShutdownTask] DefaultShutdownStrategy =A0 =A0 =A0 =A0I= NFO > Waiting as there are still 2 inflight and pending exchanges to complete > before we can shutdown > [ Camel Thread 4 - ShutdownTask] DefaultShutdownStrategy =A0 =A0 =A0 =A0I= NFO > Waiting as there are still 1 inflight and pending exchanges to complete > before we can shutdown > [ Camel Thread 4 - ShutdownTask] DefaultShutdownStrategy =A0 =A0 =A0 =A0I= NFO > Waiting as there are still 1 inflight and pending exchanges to complete > before we can shutdown > [ Camel Thread 4 - ShutdownTask] DefaultShutdownStrategy =A0 =A0 =A0 =A0I= NFO > Waiting as there are still 1 inflight and pending exchanges to complete > before we can shutdown > [ Camel Thread 4 - ShutdownTask] DefaultShutdownStrategy =A0 =A0 =A0 =A0I= NFO > Waiting as there are still 1 inflight and pending exchanges to complete > before we can shutdown > > -- > View this message in context: http://old.nabble.com/Route-not-shutting-do= wn-on-shutdownRoute-%281-inflight%29.-tp28740002p28740002.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > --=20 Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus