From dev-return-11373-apmail-activemq-dev-archive=activemq.apache.org@activemq.apache.org Thu Jul 03 12:23:51 2008 Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 87430 invoked from network); 3 Jul 2008 12:23:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jul 2008 12:23:51 -0000 Received: (qmail 39739 invoked by uid 500); 3 Jul 2008 12:23:52 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 39711 invoked by uid 500); 3 Jul 2008 12:23:52 -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 39700 invoked by uid 99); 3 Jul 2008 12:23:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jul 2008 05:23:52 -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; Thu, 03 Jul 2008 12:23:09 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4F9E3234C14D for ; Thu, 3 Jul 2008 05:23:00 -0700 (PDT) Message-ID: <577197497.1215087780324.JavaMail.jira@brutus> Date: Thu, 3 Jul 2008 05:23:00 -0700 (PDT) From: "Jan Wiemer (JIRA)" To: dev@activemq.apache.org Subject: [jira] Commented: (AMQ-1837) Lost messages after broker recovery In-Reply-To: <315386053.1215084180263.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQ-1837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43907#action_43907 ] Jan Wiemer commented on AMQ-1837: --------------------------------- Note that the problem seems not to occur when working with a single queue (and one sender thread and one receiver thread). > Lost messages after broker recovery > ----------------------------------- > > Key: AMQ-1837 > URL: https://issues.apache.org/activemq/browse/AMQ-1837 > Project: ActiveMQ > Issue Type: Bug > Components: Message Store > Affects Versions: 5.1.0 > Reporter: Jan Wiemer > Priority: Critical > Attachments: src.zip > > > We experienced that some messages (send in persistent mode) were lost after the message broker was killed and restarted. > The attached little test simulates the situation: > There are 10 queues, 10 sender and 10 receiver threads each sending / receiving quite frequently to / from one queue for a quite long time. > The receiver for each queue expects the messages exactly in the order the sender has send the messages. > After restarting (killing) the broker the order of the received messages gets disturbed or messages get lost. > * Start the broker as configures by default in the distribution (only switch on JMX support). > * Start the main method of the attached class > * Wait until some messages are received > * kill or shutdown the broker > * restart the broker > * have a look at the output of the test class > {code:title=Output} > Exception in ReceiverThread: java.lang.RuntimeException: Received unexpected message! Expected: QUEUE-4: #3197, Received: QUEUE-4: #3267 > {code} > {code:title=Broker Output} > ... > INFO BrokerService - Using Persistence Adapter: AMQPersistenceAdapter(D:\sandbox\Experimental\Activemq\apache-activemq-5.2-SNAPSHOT\bin\..\data) > INFO AMQPersistenceAdapter - AMQStore starting using directory: D:\sandbox\Experimental\Activemq\apache-activemq-5.2-SNAPSHOT\bin\..\data > INFO KahaStore - Kaha Store using data directory D:\sandbox\Experimental\Activemq\apache-activemq-5.2-SNAPSHOT\bin\..\data\kr-store\state > INFO AMQPersistenceAdapter - Active data files: [] > WARN AMQPersistenceAdapter - The ReferenceStore is not valid - recovering ... > INFO KahaStore - Kaha Store successfully deleted data directory D:\sandbox\Experimental\Activemq\apache-activemq-5.2-SNAPSHOT\bin\..\data\kr-store\data > INFO AMQPersistenceAdapter - Journal Recovery Started from: DataManager:(data-) > INFO KahaStore - Kaha Store using data directory D:\sandbox\Experimental\Activemq\apache-activemq-5.2-SNAPSHOT\bin\..\data\kr-store\data > INFO AMQPersistenceAdapter - Recovered 198261 operations from redo log in 18.028 seconds. > INFO AMQPersistenceAdapter - Finished recovering the ReferenceStore > INFO BrokerService - ActiveMQ 5.2-SNAPSHOT JMS Message Broker (localhost) is starting > ... > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.