You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Olivier Ziller <ol...@gmail.com> on 2012/12/19 22:24:00 UTC

start a route at the end of another

Hello,

i have a route that reads a directory and process a number of files 
contained in this directory.
i would like to log the number of files at the end of the processing of 
the directory.

i tried to use oncompletion but it's called for each file.

any idea on how to do that?

thanks in advance

Re: start a route at the end of another

Posted by ziller <ol...@gmail.com>.
Hello,

thanks, i will try that

best regards



--
View this message in context: http://camel.465427.n5.nabble.com/start-a-route-at-the-end-of-another-tp5724407p5724451.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: start a route at the end of another

Posted by Willem jiang <wi...@gmail.com>.
Hi  
The pulled files are processed one by one, so you camel route doesn't know who many files are processed.
But you should be able to access the Exchange property like  
Exchange.BATCH_INDEX, Exchange.BATCH_SIZE, Exchange.BATCH_COMPLETE in the onCompletion method.
Then you can write some log for it.


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Thursday, December 20, 2012 at 5:24 AM, Olivier Ziller wrote:

> Hello,
>  
> i have a route that reads a directory and process a number of files  
> contained in this directory.
> i would like to log the number of files at the end of the processing of  
> the directory.
>  
> i tried to use oncompletion but it's called for each file.
>  
> any idea on how to do that?
>  
> thanks in advance