Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-12850

camel-ftp tries reconnects twice as much as maximumReconnectAttempts

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.22.1
    • Fix Version/s: 2.21.3, 2.22.2, 2.23.0
    • Component/s: camel-ftp
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      When maximumReconnectAttempts > 0 on the endpoint, both camel-ftp consumers and producers retry connecting to an unavailable FTP server twice as much as the number of maximumReconnectAttempts. It is because of the following logic in RemoteFileConsumer.prePollCheck() and RemoteFileProducer.preWriteCheck():

                      if (getEndpoint().getMaximumReconnectAttempts() > 0) {
                          // only use recoverable if we are allowed any re-connect attempts
                          recoverableConnectIfNecessary();
                      } else {
                          connectIfNecessary();
                      }
      

      where recoverableConnectIfNecessary() retries RemoteFileOperations.connect() once in case of initial connection failure.

      Digging into the commit history, this logic appears to be introduced due to CAMEL-2829 as a workaround. However, since the root cause NET-327 is already resolved the logic doesn't seem to be necessary any more. So probably we can remove the logic to avoid attempting reconnects twice as much as maximumReconnectAttempts.

        Attachments

          Activity

            People

            • Assignee:
              tadayosi Tadayoshi Sato
              Reporter:
              tadayosi Tadayoshi Sato
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: