Hi, Tried several methods of trying to achieve this: FTP download with one or many files ( wildcard fileName ) one shot, no polling and do not exit the thread until all files are downloaded (could be 1 1K file or a hundred 1MB files).
Claus suggested PollingConsumer but also stated "The Polling Consumer will poll 1 file at a time" so not suitable for many files. So now I have this: routeD.from(sourcePath); routeD.to(localPath+"?fileExist=Override"); HaltProcessor pHalt = new HaltProcessor(); pHalt.setContext(camelContext); routeD.routeId(sourcePath); pHalt.setRouteId(sourcePath); routeD.process(pHalt); camelContext.addRouteDefinition(routeD); camelContext.startRoute(routeD); where the HaltProcessor has this: public void process(Exchange exchange) throws Exception { if(context!=null && routeId != null) { // remove myself from the in flight registry so we can stop this route without trouble context.getInflightRepository().remove(exchange); // stop this route context.stopRoute(routeId); } } This still seems to exit before the files are completely downloaded. I want it to wait until they are complete. So will adding a PolicyRoute and using onExchangeDone allow me to interrogate the ftp endpoint to know that it has for example found 24 files that match the fileName with wildcards and that it has completed all of them? It is clear what onExchangeDone means in the context of a message like a JMS etc. but not in the context of a file in the process of being downloaded via ftp. thanks, David