Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-3920

Performance issue with delay policy in DestinationBridge.onMessage

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.6.0
    • Fix Version/s: 5.7.0
    • Component/s: Broker
    • Labels:
      None

      Description

      Incorrect sleep implementation in org.apache.activemq.network.jms.DestinationBridge.onMessage

      In the current implementation the condition 'attempt > 0' is true during the first iteration. It causes critical performance problems in high load environment.

      Code example from DestinationBridge.onMessage:
      ...
      while (started.get() && message != null && ++attempt <= maxRetries) {

      try {

      if (attempt > 0) {//IT'S TRUE DURING FIRST ITERATION
      try

      { Thread.sleep(jmsConnector.getReconnectionPolicy().getNextDelay(attempt)); }

      catch(InterruptedException e)

      { break; }

      }
      ...

        Attachments

          Activity

            People

            • Assignee:
              tabish Timothy A. Bish
              Reporter:
              ermakovs Sergey Ermakov
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: