camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Quinn Stevenson <qu...@pronoia-solutions.com>
Subject Re: file trigger processing lots of files
Date Thu, 17 Mar 2016 15:04:08 GMT
Do you need such a short shutdown timeout?  Camel is killing your exchange(s) before they complete
(one less than the number of threads you have active I’d guess).  If you could give the
exchanges enough time to shutdown, I think you’d have what you’re after.

As far as CamelBatchComplete goes, as far as I know, it gets put on the file/exchange.  So
I would imagine the last file in the batch is completing before other file(s), and then the
shutdown strategy is killing off the remaining exchanges.  So CamelBatchComplete is working
correctly - you have a race condition.

If you can’t increase the shutdown time, I’d guess you’ll have to write your own shutdown
strategy to get what you’re after - but I think you’ll wind up with something very close
to what the default is, but with a longer timeout.


> On Mar 17, 2016, at 4:02 AM, jamesburn <James.Burn@oup.com> wrote:
> 
> Hi
> 
> Yes and yes. 
> 
> A .camellock file appears for each of the files, and most are
> processed/removed. but CamelBatchComplete is then set to true and the route
> stops. The .camellock for the file which I put a delay on is then cleared
> and the file remains unprocessed.
> 
> I've customised the shutdown strategy to avoid having to wait for 5 minutes
> by:
> 
> 	<bean id="defaultShutdownStrategy" 
> 		class="org.apache.camel.impl.DefaultShutdownStrategy"> 
> 		<property name="timeout" value="10"/> 
> 		<property name="shutdownNowOnTimeout" value="true"/> 
> 	</bean> 
> 
> My concern is still that I need to know when all the threads have completed
> (succesfully/with a pause or not) and THEN trigger the route shutdown/other
> stuff. 
> 
> CamelBatchComplete seems to be set to true before this event however?
> 
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/file-trigger-processing-lots-of-files-tp5778807p5779203.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message