Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 44752 invoked from network); 4 Jun 2008 12:43:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Jun 2008 12:43:24 -0000 Received: (qmail 7100 invoked by uid 500); 4 Jun 2008 12:43:26 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 7080 invoked by uid 500); 4 Jun 2008 12:43:26 -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 7069 invoked by uid 99); 4 Jun 2008 12:43:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jun 2008 05:43:26 -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; Wed, 04 Jun 2008 12:42:45 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 507E9234C131 for ; Wed, 4 Jun 2008 05:43:00 -0700 (PDT) Message-ID: <1809882473.1212583380324.JavaMail.jira@brutus> Date: Wed, 4 Jun 2008 05:43:00 -0700 (PDT) From: "Kevin (JIRA)" To: dev@activemq.apache.org Subject: [jira] Created: (AMQ-1767) Multiple creating and closing consumers causes messages duplicated delivered MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Multiple creating and closing consumers causes messages duplicated delivered ---------------------------------------------------------------------------- Key: AMQ-1767 URL: https://issues.apache.org/activemq/browse/AMQ-1767 Project: ActiveMQ Issue Type: Bug Components: Broker Affects Versions: 5.1.0 Environment: Windows XP, Java 1.5 Reporter: Kevin Attachments: JUnit.zip Hi *, I'm running AcitveMQ 5.1 in a VM. The broker is set as persistent with amq-store, the xml-configuration-file is attached (in the zip-file). One MessageProducer sends 10.000 messages to a queue. The producers runs in its own thread with its own session. The queue is set as transacted. Two MessageConsumers register on the queue mentioned above, each in its own thread with its own session. The Producer and the Consumers share one connection-object. Every second one Consumer is called to be canceld (by session.close - a call to consumer.close does not help), its thread is stopped and a new Consumer is created in a new thread with its own session. What happens? 1 to 10 messages are duplicated delivered from some consumers. So the 'EnqueueCount' is greater than the 'DequeueCount'. E.G. 10.002 messages are recieved, but just 10.000 messages are sent. I've tried to synchronized by one common-object the creating, closing or commiting in the Consumer with no success. Attached is a junit-test, which demonstrates the situation. Before have a look at the Config-Class and change the ip-address, where your broker runs. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.