camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas A." <>
Subject Re: How do YOU handle scheduling?
Date Tue, 14 Sep 2010 12:30:42 GMT


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

public class FtpsPoller {
	private ConsumerTemplate consumer;

	private ProducerTemplate producer;
	public void poll() throws Exception {		
		String ftpsUri =
		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:
Sent from the Camel - Users mailing list archive at

View raw message