camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Premkumar <>
Subject Camel reconnectDelay and maximumReconnectAttempts not working with ConsumerTemplete
Date Mon, 28 Mar 2016 19:04:34 GMT
I have Quartz Cron job that runs on some schedule and i am using Camel
Consumer, Producer template to pickup some files from FTP site and copy it
local file system. When using reconnectDelay=60000 and
maximumReconnectAttempts=3,throwExceptionOnConnectFailed=true with FTP
consumer it doesn't try to reconnect, i get null for exchange and consumer

Code snippet

public class ScheduleProcessorJob extends QuartzJobBean {

	private ProducerTemplate producerTemplate;
	private ConsumerTemplate consumerTemplate;

protected void executeInternal(JobExecutionContext jobContext)
			throws JobExecutionException {

Sample srcEndpoint

		// loop to get all the files in the remote site
	        while (true) {
	            Exchange remoteExchange =
consumerTemplate.receive(srcEndPoint.toString(), 5000);
	            if (remoteExchange == null) {
		Exchange postExchange =
				/* In case on error
				if(null != postExchange.getException()){

					throw postExchange.getException();
		} catch (Exception ex){
			LOGGER.error("Error Picking up from Customer ",ex);
			try {
			} catch (Exception ex) {
				LOGGER.error("Error Stopping Consumer template ",ex);

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message