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 5FCCC98A8 for ; Wed, 15 May 2013 20:41:17 +0000 (UTC) Received: (qmail 513 invoked by uid 500); 15 May 2013 20:41:17 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 449 invoked by uid 500); 15 May 2013 20:41:17 -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 435 invoked by uid 99); 15 May 2013 20:41:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 May 2013 20:41:17 +0000 Date: Wed, 15 May 2013 20:41:16 +0000 (UTC) From: "Timothy Bish (JIRA)" To: dev@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMQ-4413) Persistent message loss when JMS durable subscriber reconnects regardless of message store impl. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-4413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13658777#comment-13658777 ] Timothy Bish commented on AMQ-4413: ----------------------------------- If you can provide a test that reproduces with a store it would be more useful. > Persistent message loss when JMS durable subscriber reconnects regardless of message store impl. > ------------------------------------------------------------------------------------------------ > > Key: AMQ-4413 > URL: https://issues.apache.org/jira/browse/AMQ-4413 > Project: ActiveMQ > Issue Type: Bug > Components: Broker, JMS client, Message Store > Affects Versions: 5.7.0, 5.8.0 > Reporter: Jaewoong Choi > Priority: Critical > Attachments: AMQ4413-testcase.patch, AMQ4413Test.java, AMQ4413Test.java, Test.java > > > Persistent message is lost intermittently when JMS durable topic subscriber reconnects to the broker service. From the log observation, it seems that the internal states of the store cursor (i.e. AbstractStoreCursor) is not well guarded by race condition between message sending/directly-dispatching-pending thread (from publisher) and subscription deactivating thread (from subscriber's closing), especially when subscriber's closing (javax.jms.MessageConsumer#close) and message publishing happen simultaneously. > Observations and the test scenario are described at below in detail: > http://activemq.2283324.n4.nabble.com/persistent-message-missing-to-a-durable-subscriber-when-it-reconnects-restarts-td4665130.html > Attached please find Test.java that I used to verify this issue. I found the issue initially with activemq-core-5.7.0.jar then confirmed that it's reproducible with other upper versions (i.e. apache-activemq-5.8-SNAPSHOT, apache-activemq-5.9-SNAPSHOT). > This "message loss" issue is pretty critical as it can happen whenever durable subscriber reconnects either purposely or unexpectedly, and it could be violating the one of primitive features that messaging platform guarantees: "no message loss", if happens, whereas it's so easy to reproduce the trouble. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira