You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by toxels87 <to...@gmail.com> on 2014/03/07 13:17:02 UTC

File is 0 bytes after FTP transfer (in some cases)

I have a route where files are downloaded from aan FTP endpoint, to a local
folder.

In some cases, the incoming file is 0 bytes, while the file on the FTP
server is not empty.

Can you think of any reasons why the file transferred is empty?




my code:

CronScheduledRoutePolicy policy = new CronScheduledRoutePolicy();
        policy.setRouteStartTime("30 0/30 7-19 ? * MON-SAT");
     
        from(start)
                .routeId(routeId)
                .routePolicy(policy)
                .noAutoStartup() // no auto startup, startup time controlled
by CRON
                .to(end)
               
.filter(property(Exchange.BATCH_COMPLETE).isEqualTo(Boolean.TRUE))
                .process(new Processor() {
                    @Override
                    public void process(Exchange exchange) throws Exception
{
                        LOGGER.log(Level.INFO, "### cronfile.route - Full
file Transfer Complete: Route SUSPENDED");
                        CamelContext context = exchange.getContext();

                        // remove exchange from the in flight registry so we
can stop this route without trouble
                        context.getInflightRepository().remove(exchange);
                        context.suspendRoute(routeId);
                    }
                })
                .end();
    }



--
View this message in context: http://camel.465427.n5.nabble.com/File-is-0-bytes-after-FTP-transfer-in-some-cases-tp5748445.html
Sent from the Camel - Users mailing list archive at Nabble.com.