Hi

I'm now trying to just use a Spring trigger and a simple class using
ConsumerTemplate and ProducerTemplate to fetch the files. However, I can't
get the ConsumerTemplate to stop polling when I first start it, what's going
on?

public class FtpsPoller {
        @Autowired
        private ConsumerTemplate consumer;

        @Autowired
        private ProducerTemplate producer;
                
        public void poll() throws Exception {           
                String ftpsUri =
"ftps:{{ftp.address}}{{ftp.path.out}}?username={{ftp.username}}&password={{ftp.password}}
                String fileUri = "file:{{path.out}}";
                Exchange exchange = null;
                do {
                        exchange = consumer.receive(ftpsUri);
                        producer.send(fileUri, exchange);
                } while(exchange != null);
                consumer.stop(); //Doesn't stop anything
        }
}
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/How-do-YOU-handle-scheduling-tp2838886p2839061.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to