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

Performance issue with delay policy in DestinationBridge.onMessage

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 5.6.0
    • 5.7.0
    • Broker
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: