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

MessageServlet reads too many messages

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.0, 5.1.0, 5.2.0, 5.3.0
    • Fix Version/s: 5.2.0
    • Component/s: Transport
    • Labels:
      None
    • Environment:

      Any

    • Patch Info:
      Patch Available

      Description

      MessageServlet inside activemq-web will pull maxMessages+1 messages off of the queue but only write a response containing maxMessages.

      After some debugging, I figured out that the problem is with the while loop that reads messages inside the doMessages method (and doMessagesWithoutContinuation). It always reads a message at the end of the loop, without first checking to see if maxMessages has already been reached.

      Attached is a patch that corrects this issue.

        Attachments

          Activity

            People

            • Assignee:
              dejanb Dejan Bosanac
              Reporter:
              mikerichmond Mike Richmond
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: