Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C06EFCF42 for ; Wed, 16 May 2012 16:09:24 +0000 (UTC) Received: (qmail 36483 invoked by uid 500); 16 May 2012 16:09:24 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 36447 invoked by uid 500); 16 May 2012 16:09:24 -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 36439 invoked by uid 99); 16 May 2012 16:09:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 May 2012 16:09:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 May 2012 16:09:23 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 39C4982CD for ; Wed, 16 May 2012 16:09:03 +0000 (UTC) Date: Wed, 16 May 2012 16:09:03 +0000 (UTC) From: "David Harp (JIRA)" To: dev@activemq.apache.org Message-ID: <1486156557.4502.1337184543238.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (AMQ-3846) The JMX message move, copy and remove operation do not take messages in FIFO order MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org David Harp created AMQ-3846: ------------------------------- Summary: The JMX message move, copy and remove operation do not take messages in FIFO order Key: AMQ-3846 URL: https://issues.apache.org/jira/browse/AMQ-3846 Project: ActiveMQ Issue Type: Bug Components: JMX Affects Versions: 5.6.0, 5.5.1 Reporter: David Harp When a page is pulled in, it is placed in a LinkedHashMap which preserves the queue order, but the below code then pulls the values from the LinkedHashMap and puts them in a Set. This causes the FIFO order of the queue to be lost. If the number of max messages to move is smaller the the page size, then the outcome looks like random messages from the queue being moved (copied or removed). ... Set set = new HashSet(); ConnectionContext context = createConnectionContext(); do { doPageIn(true); pagedInMessagesLock.readLock().lock(); try{ set.addAll(pagedInMessages.values()); }finally { pagedInMessagesLock.readLock().unlock(); } ... Can this be changed to preserve the queue order? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira