Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 40783 invoked from network); 26 Sep 2008 14:47:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Sep 2008 14:47:44 -0000 Received: (qmail 87472 invoked by uid 500); 26 Sep 2008 14:47:41 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 87454 invoked by uid 500); 26 Sep 2008 14:47:41 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 87442 invoked by uid 99); 26 Sep 2008 14:47:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Sep 2008 07:47:41 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Sep 2008 14:46:48 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9F072234C1E0 for ; Fri, 26 Sep 2008 07:46:52 -0700 (PDT) Message-ID: <255520708.1222440412646.JavaMail.jira@brutus> Date: Fri, 26 Sep 2008 07:46:52 -0700 (PDT) From: "Mike Richmond (JIRA)" To: dev@activemq.apache.org Subject: [jira] Created: (AMQ-1955) MessageServlet reads too many messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org MessageServlet reads too many messages -------------------------------------- Key: AMQ-1955 URL: https://issues.apache.org/activemq/browse/AMQ-1955 Project: ActiveMQ Issue Type: Bug Components: Transport Affects Versions: 5.2.0, 5.1.0, 5.0.0, 5.3.0 Environment: Any Reporter: Mike Richmond Attachments: MessageServlet.java.patch 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. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.