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 71A8717782 for ; Thu, 9 Apr 2015 12:43:21 +0000 (UTC) Received: (qmail 24972 invoked by uid 500); 9 Apr 2015 12:43:21 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 24930 invoked by uid 500); 9 Apr 2015 12:43:21 -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 24919 invoked by uid 99); 9 Apr 2015 12:43:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Apr 2015 12:43:20 +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; Thu, 09 Apr 2015 12:43:15 +0000 Received: from msam.nabble.com (unknown [162.253.133.85]) by mwork.nabble.com (Postfix) with ESMTP id DCBF71A46418 for ; Thu, 9 Apr 2015 05:41:52 -0700 (PDT) Date: Thu, 9 Apr 2015 05:41:24 -0700 (MST) From: ekz To: users@camel.apache.org Message-ID: <1428583284661-5765513.post@n5.nabble.com> In-Reply-To: <1428507300727-5765484.post@n5.nabble.com> References: <1428476658454-5765466.post@n5.nabble.com> <1428507300727-5765484.post@n5.nabble.com> Subject: Re: 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, How it is meaningful to put that "Thread.sleep(reconnectDelay)" to CustomPollStrategy instead of the one in SftpOperations class ? 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. *try { Thread.sleep(((RemoteFileEndpoint) endpoint).getReconnectDelay()); } catch (Exception e) { }* return false; } } } Does it have a negative impact on another place of the camel? Thanks in advance. -- View this message in context: http://camel.465427.n5.nabble.com/FTP-Reconnect-attempt-problem-tp5765466p5765513.html Sent from the Camel - Users mailing list archive at Nabble.com.