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

Investigate and consolidate do-wait-retry logic in components

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.13.0
    • 3.14.0, 3.x
    • None
    • None
    • Unknown

    Description

      In many components we have pieces of code that resemble the following:

      • do some (usually remote) work
      • test the result
        • if failed
          • wait (usually w/ Thread.sleep)
          • repeat
      • Break loop if successful

       

      We may have some potential for consolidating this logic in one of the core modules to reduce the code size and increase reuse.

       

      Some likely candidates as of 3.13.0-SNAPSHOT are:

      org.apache.camel.component.mllp.internal.TcpServerBindThread#doAccept
      org.apache.camel.component.file.remote.strategy.FtpChangedExclusiveReadLockStrategy#acquireExclusiveReadLock
      org.apache.camel.component.file.remote.SftpOperations#connect
      org.apache.camel.component.file.remote.FtpOperations#doConnect
      org.apache.camel.component.file.GenericFilePollingConsumer#doReceive
      org.apache.camel.component.jms.reply.ReplyManagerSupport#waitForProvisionCorrelationToBeUpdated
      org.apache.camel.component.couchdb.CouchDbChangesetTracker#waitForStability
      org.apache.camel.component.mock.MockEndpoint#expectedFileExists(java.lang.String, java.lang.String)
      org.apache.camel.component.mongodb.MongoAbstractConsumerThread#run
      org.apache.camel.component.mongodb.gridfs.GridFsConsumer#run
      org.apache.camel.component.optaplanner.OptaPlannerProducer#processWithXmlFile
      org.apache.camel.component.rabbitmq.RabbitConsumer#handleShutdownSignal
      org.apache.camel.component.rabbitmq.RabbitMQConsumer.StartConsumerCallable#call
      org.apache.camel.component.rabbitmq.reply.ReplyManagerSupport#waitForProvisionCorrelationToBeUpdated
      org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper#performClientRestart
      org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper#subscribe
      org.apache.camel.component.smpp.SmppConsumer#reconnect
      org.apache.camel.component.soroushbot.utils.ExponentialBackOffStrategy
      org.apache.camel.component.soroushbot.utils.FixedBackOffStrategy
      org.apache.camel.component.soroushbot.utils.LinearBackOffStrategy
      org.apache.camel.component.splunk.support.SplunkDataReader#savedSearch
      org.apache.camel.component.splunk.support.SplunkDataReader#runQuery
      org.apache.camel.component.ssh.SshHelper#getPrompt
      org.apache.camel.component.stream.StreamConsumer#readFromStream
      org.apache.camel.component.stream.StreamConsumer#doPromptMessage
      org.apache.camel.support.cache.DefaultProducerCache#acquireProducer
      org.apache.camel.test.junit4.TestSupport#deleteDirectory(java.io.File)
      org.apache.camel.test.junit5.TestSupport#deleteDirectory(java.io.File)
      org.apache.camel.util.FileUtil#delete
      org.apache.camel.util.FileUtil#renameFile
      org.apache.camel.util.FileUtil#deleteFile
      org.apache.camel.component.websocket.WebsocketProducer#sendToAll
      org.apache.camel.component.zookeeper.ZooKeeperConsumer.OperationsExecutor#run
      org.apache.camel.component.zookeeper.cluster.ZooKeeperClusterView.CamelLeaderElectionListener#takeLeadership

      Attachments

        Activity

          People

            orpiske Otavio Rodolfo Piske
            orpiske Otavio Rodolfo Piske
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: