Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1091517C3E for ; Wed, 8 Apr 2015 07:06:21 +0000 (UTC) Received: (qmail 99982 invoked by uid 500); 8 Apr 2015 07:06:14 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 99933 invoked by uid 500); 8 Apr 2015 07:06:14 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 99922 invoked by uid 99); 8 Apr 2015 07:06:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Apr 2015 07:06:14 +0000 X-ASF-Spam-Status: No, hits=2.3 required=5.0 tests=SPF_SOFTFAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of ekizoner@gmail.com does not designate 162.253.133.43 as permitted sender) Received: from [162.253.133.43] (HELO mwork.nabble.com) (162.253.133.43) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Apr 2015 07:06:08 +0000 Received: from msam.nabble.com (unknown [162.253.133.85]) by mwork.nabble.com (Postfix) with ESMTP id C65F21A1826C for ; Wed, 8 Apr 2015 00:04:45 -0700 (PDT) Date: Wed, 8 Apr 2015 00:04:18 -0700 (MST) From: ekz To: users@camel.apache.org Message-ID: <1428476658454-5765466.post@n5.nabble.com> Subject: FTP Reconnect attempt problem MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, I have a route as below. My problem is about reconnect attempts. I am waiting 1 min for the next poll from ftp with the parameter "consumer.delay=60000" that is ok, but if the connection fails, expecting 2 min wait before next connection attempt but below code is still using 1 min delay for the next connection attempt. How can i achive this? (camel version: 2.14.0) from("sftp://user@host:port/?password=pw" + "&*consumer.delay=60000*" + "&passiveMode=true" + "&consumer.bridgeErrorHandler=true" + "&throwExceptionOnConnectFailed=true" + "&maximumReconnectAttempts=0" + "&*reconnectDelay=120000*" //reconnect attempt every 2 min + "&pollStrategy=#customPollStrategy") .log("consuming file from ftp : ${headers.CamelFileName}"); and my custom poll strategy is as foolws: public class CustomPollStrategy extends RemoteFilePollingConsumerPollStrategy { @Override public synchronized boolean rollback(Consumer consumer, Endpoint endpoint, int retryCounter, Exception cause) throws Exception { //retry 3 times if(retryCounter <= 2) { //force disconnect super.rollback(consumer, endpoint, retryCounter, cause); return true; } else { //give up retry and wait for the next connection attempt. return false; } } } -- View this message in context: http://camel.465427.n5.nabble.com/FTP-Reconnect-attempt-problem-tp5765466.html Sent from the Camel - Users mailing list archive at Nabble.com.