camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ankelee <andreasasm...@gmail.com>
Subject Route not shutting down on shutdownRoute (1 inflight).
Date Tue, 01 Jun 2010 10:29:46 GMT

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 still 1
inflight and pending exchanges to complete before we can shutdown" message
until timeout. Which exchange could that be, and can I somehow see it?

All the operations works as intended, except the "FtpPollingRoute" never
gets shut down until timeout.

<route id="StartFtpTriggerRoute" autoStartup="true">
	<from uri="quartz://scheduledpoll?cron=5/30+*+*+*+*+?" />
	<bean ref="ControlFtpPollingRoute" method="start" />
	<stop/>
</route>

<route id="FtpPollingRoute" autoStartup="false">
	<from
uri="ftp://{{ftp.server}}{{ftp.inbox}}?username={{ftp.user}}&amp;password={{ftp.password}}&amp;move=done"
/>
	<onCompletion>
		<log message="onComplete =  ${property.CamelBatchComplete}"/>
		<filter>				
			<simple>${property.CamelBatchComplete} == true</simple>
			<log message="Stopping"/>
			<bean ref="ControlFtpPollingRoute" method="stop" />
			<log message="Stopped"/>
		</filter>		
	</onCompletion>
	<log message="Fetching ${file:name}"/>	
	<to uri="file:{{directory.incoming}}" />
	<log message="${file:name} copied"/>			
</route>


[ssword=camel123&username=camel] FtpConsumer                    INFO 
Connected and logged in to: ftp://camel@localhost:21
[ssword=camel123&username=camel] FtpPollingRoute                INFO 
Fetching  CamelinAction (1).pdf
[ssword=camel123&username=camel] FtpPollingRoute                INFO 
CamelinAction (1).pdf copied
[ Camel Thread 1 - OnCompletion] FtpPollingRoute                INFO 
onComplete =  false
[ssword=camel123&username=camel] FtpPollingRoute                INFO 
Fetching  CamelinAction (2).pdf
[ssword=camel123&username=camel] FtpPollingRoute                INFO 
CamelinAction (2).pdf copied
[ Camel Thread 2 - OnCompletion] FtpPollingRoute                INFO 
onComplete =  false
[ssword=camel123&username=camel] FtpPollingRoute                INFO 
Fetching  CamelinAction (3).pdf
[ssword=camel123&username=camel] FtpPollingRoute                INFO 
CamelinAction (3).pdf copied
[ Camel Thread 3 - OnCompletion] FtpPollingRoute                INFO 
onComplete =  true
[ Camel Thread 3 - OnCompletion] FtpPollingRoute                INFO 
Stopping
[ Camel Thread 3 - OnCompletion] DefaultShutdownStrategy        INFO 
Starting to graceful shutdown 1 routes (timeout 300 seconds)
[ Camel Thread 4 - ShutdownTask] DefaultShutdownStrategy        INFO  Route:
FtpPollingRoute suspended and shutdown deferred, was consuming from:
Endpoint[ftp://localhost/inbox?move=done&password=camel123&username=camel]
[ Camel Thread 4 - ShutdownTask] DefaultShutdownStrategy        INFO 
Waiting as there are still 2 inflight and pending exchanges to complete
before we can shutdown
[ Camel Thread 4 - ShutdownTask] DefaultShutdownStrategy        INFO 
Waiting as there are still 1 inflight and pending exchanges to complete
before we can shutdown
[ Camel Thread 4 - ShutdownTask] DefaultShutdownStrategy        INFO 
Waiting as there are still 1 inflight and pending exchanges to complete
before we can shutdown
[ Camel Thread 4 - ShutdownTask] DefaultShutdownStrategy        INFO 
Waiting as there are still 1 inflight and pending exchanges to complete
before we can shutdown
[ Camel Thread 4 - ShutdownTask] DefaultShutdownStrategy        INFO 
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-down-on-shutdownRoute-%281-inflight%29.-tp28740002p28740002.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message