Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 37584 invoked from network); 9 Oct 2007 17:52:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Oct 2007 17:52:04 -0000 Received: (qmail 6528 invoked by uid 500); 9 Oct 2007 17:51:51 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 6503 invoked by uid 500); 9 Oct 2007 17:51:51 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 6494 invoked by uid 99); 9 Oct 2007 17:51:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2007 10:51:51 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rajdavies@gmail.com designates 209.85.134.187 as permitted sender) Received: from [209.85.134.187] (HELO mu-out-0910.google.com) (209.85.134.187) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2007 17:51:52 +0000 Received: by mu-out-0910.google.com with SMTP id i2so2173467mue for ; Tue, 09 Oct 2007 10:51:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:in-reply-to:references:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer; bh=1tIZE+XlIWp+NtEFceeOv08Q6zGIRvrA1WRrFnz5Szc=; b=TPoHkjPOxdqYUAjTcfuunggB0jPisY6/Pe1SXvZgv9lq4GYm/3VbPfwSAmwrBgEMkrHEvIlE7yHpzu6DU9I66jVNsDVb1MnL4LZ5E14KFmB4B8Ito8Dy29mWrHfWf4/Re7kNmCwdomRHsFuC98csQaxyMHMsVG2dOsnQ300AZQg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:in-reply-to:references:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer; b=hdK6c7NLjmu7Hsi/8syWALNx4WsH/dCDWLcJLg2+sALMqEjinr9wy6wLCwDZuYu3CrenVAhEVnc4h68RXeBQLBtSHgbElEPRfsepTUkQTEjGkBZS+Qa6Bvm63qO8QaaOKnl5oRbQZ2QlnAeHUrNN3U4N2PeBjzBfPu1yroju5YY= Received: by 10.82.189.6 with SMTP id m6mr28661260buf.1191952289086; Tue, 09 Oct 2007 10:51:29 -0700 (PDT) Received: from ?192.168.1.67? ( [86.130.75.52]) by mx.google.com with ESMTPS id 7sm254825nfv.2007.10.09.10.51.27 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 09 Oct 2007 10:51:28 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <470B117B.40507@nuix.com> References: <470349B9.7060603@nuix.com> <6EC5F211-DC83-4B53-A58A-0A0051D1457E@gmail.com> <47044A49.2030506@nuix.com> <4705DBC5.4010305@nuix.com> <003FD31C-A521-46C3-A065-63AF433BA083@gmail.com> <47098C84.6070807@nuix.com> <286F0CE9-4129-46C2-B193-37A1A07D849B@gmail.com> <4709C089.2000105@nuix.com> <470B117B.40507@nuix.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Rob Davies Subject: Re: Duplicate message delivered to consumers on queue with AMQ persistence Date: Tue, 9 Oct 2007 18:51:22 +0100 To: users@activemq.apache.org X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org Hi Dave, spent ages trying to reproduce this with no luck - anybody else had luck reproducing this on the latest? cheers, Rob http://rajdavies.blogspot.com/ On Oct 9, 2007, at 6:28 AM, David Sitsky wrote: > Hi Rob, > > Looks like the original issue I reported with duplicate messages > being dispatched has resurfaced again. I don't see it happening in > the original situation where I saw it with kaha persistence, but > now with different data loaded in my application. > > This time the issue occurs with AMQ persistence. I have tried to > add as much detail as possible here: https://issues.apache.org/ > activemq/browse/AMQ-1452. > > Unfortunately, I have had no luck with reproducing this issue in a > unit test... but I hope the message logs attached to the issue > might provide you with some clues. > > Cheers, > David > > David Sitsky wrote: >> Hi Rob, >> Yes - I haven't seen the issue in my application since updating. >> Many thanks again. >> Cheers, >> David >> Rob Davies wrote: >>> Hi David, >>> >>> I had a test case that periodically could reproduce this - it now >>> can't after ensuring references are always freshed in the Kaha >>> reference store part of AMQ Store. Is your application now fixed? >>> >>> thanks, >>> >>> Rob >>> On Oct 8, 2007, at 2:48 AM, David Sitsky wrote: >>> >>>> Hi Rob, >>>> >>>> Looks like you have fixed this issue - many thanks. >>>> >>>> Cheers, >>>> David >>>> >>>> Rob Davies wrote: >>>>> Hi David, >>>>> I've had a look through the log you've attached to AMQ-1445 - >>>>> but I think i'll need some more information to successfully >>>>> resolve whats going on. Obviously there's an attempt to >>>>> retrieve a message that's already been deleted - I just need >>>>> to find out why ;) >>>>> Could I trouble you to try and devise a junit test case to >>>>> reproduce? >>>>> thanks, >>>>> Rob >>>>> On Oct 5, 2007, at 7:37 AM, David Sitsky wrote: >>>>>> Hi Rob, >>>>>> >>>>>> I think I spoke too soon. While using AMQ store fixed the >>>>>> initial issue I was dealing with, it seems to have other >>>>>> issues in my application, where I see the following message >>>>>> before everything hangs: >>>>>> >>>>>> RecoveryListenerAdapter - Message id ID... could not be >>>>>> recovered from the data store! >>>>>> >>>>>> I created a JIRA record which contains the detailed debug >>>>>> message logs: >>>>>> >>>>>> https://issues.apache.org/activemq/browse/AMQ-1445 >>>>>> >>>>>> FWIW, JDBC persistence works fine. Any ideas what might be >>>>>> wrong? >>>>>> >>>>>> Cheers, >>>>>> David >>>>>> >>>>>> David Sitsky wrote: >>>>>>> Hi Rob, >>>>>>> Looks like the AMQ store works correctly - thanks for the >>>>>>> advice. >>>>>>> Cheers, >>>>>>> David >>>>>>> Rob Davies wrote: >>>>>>>> Do you get the same using AMQ store (the default in 5.0) - >>>>>>>> its the prefered store over kaha in ActiveMQ 5.0 >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> cheers, >>>>>>>> >>>>>>>> Rob >>>>>>>> >>>>>>>> http://rajdavies.blogspot.com/ >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Oct 3, 2007, at 8:50 AM, David Sitsky wrote: >>>>>>>> >>>>>>>>> I have discovered an issue with the latest activemq 5.0 >>>>>>>>> (revision 581510) which seems to have been present for some >>>>>>>>> time, at least for the last month. >>>>>>>>> >>>>>>>>> I have an application using transactions, and kaha >>>>>>>>> persistence, and two consumers feeding off a queue. >>>>>>>>> >>>>>>>>> I sometimes see the same message being sent to two >>>>>>>>> consumers. All transactions were committed (no rollbacks), >>>>>>>>> and as you can see by the debug dump, the message has the >>>>>>>>> same message-ID, but was delivered to two separate >>>>>>>>> consumers, running on separate threads, using sync receives >>>>>>>>> with a prefetch of 0, with separate sessions of course. >>>>>>>>> >>>>>>>>> Is this a known problem? It doesn't always happen - seems >>>>>>>>> to be a race condition. If I turn off persistence, I don't >>>>>>>>> seem to see it. >>>>>>>>> >>>>>>>>> Here is the message being delivered to consumer 1: >>>>>>>>> >>>>>>>>> 2007-10-03 17:21:37,310 [Worker >>>>>>>>> 060bacd87f4a40a4867113e2e3e553dd] 85475 DEBUG >>>>>>>>> org.apache.activemq.ActiveMQMessageConsumer - >>>>>>>>> ID:tamarama-62436-1191396093006-2:2:3:2 received message: >>>>>>>>> MessageDispatch {commandId = 0, responseRequired = false, >>>>>>>>> consumerId = ID:tamarama-62436-1191396093006-2:2:3:2, >>>>>>>>> destination = queue://worker-items, message = >>>>>>>>> ActiveMQObjectMessage {commandId = 50, responseRequired = >>>>>>>>> false, messageId = >>>>>>>>> ID:tamarama-62436-1191396093006-2:2:1:3:1, >>>>>>>>> originalDestination = null, originalTransactionId = null, >>>>>>>>> producerId = ID:tamarama-62436-1191396093006-2:2:1:3, >>>>>>>>> destination = queue://worker-items, transactionId = >>>>>>>>> TX:ID:tamarama-62436-1191396093006-2:2:5, expiration = 0, >>>>>>>>> timestamp = 1191396097286, arrival = 0, brokerInTime = >>>>>>>>> 1191396097290, brokerOutTime = 1191396097303, correlationId >>>>>>>>> = null, replyTo = null, persistent = true, type = null, >>>>>>>>> priority = 4, groupID = null, groupSequence = 0, >>>>>>>>> targetConsumerId = null, compressed = false, userID = null, >>>>>>>>> content = org.apache.activemq.util.ByteSequence@fa8cbc, >>>>>>>>> marshalledProperties = null, dataStructure = null, >>>>>>>>> redeliveryCounter = 0, size = 0, properties = null, >>>>>>>>> readOnlyProperties = true, readOnlyBody = true, droppable = >>>>>>>>> false}, redeliveryCounter = 0} >>>>>>>>> >>>>>>>>> Here is the same message (check the message ID) being >>>>>>>>> delivered to consumer 2: >>>>>>>>> >>>>>>>>> 2007-10-03 17:21:37,422 [Worker >>>>>>>>> 2c3169d1726b4781a423a239f65c7bd1] 85587 DEBUG >>>>>>>>> org.apache.activemq.ActiveMQMessageConsumer - >>>>>>>>> ID:tamarama-62436-1191396093006-2:2:1:2 received message: >>>>>>>>> MessageDispatch {commandId = 0, responseRequired = false, >>>>>>>>> consumerId = ID:tamarama-62436-1191396093006-2:2:1:2, >>>>>>>>> destination = queue://worker-items, message = >>>>>>>>> ActiveMQObjectMessage {commandId = 50, responseRequired = >>>>>>>>> false, messageId = >>>>>>>>> ID:tamarama-62436-1191396093006-2:2:1:3:1, >>>>>>>>> originalDestination = null, originalTransactionId = null, >>>>>>>>> producerId = ID:tamarama-62436-1191396093006-2:2:1:3, >>>>>>>>> destination = queue://worker-items, transactionId = >>>>>>>>> TX:ID:tamarama-62436-1191396093006-2:2:5, expiration = 0, >>>>>>>>> timestamp = 1191396097286, arrival = 0, brokerInTime = >>>>>>>>> 1191396097290, brokerOutTime = 1191396097417, correlationId >>>>>>>>> = null, replyTo = null, persistent = true, type = null, >>>>>>>>> priority = 4, groupID = null, groupSequence = 0, >>>>>>>>> targetConsumerId = null, compressed = false, userID = null, >>>>>>>>> content = org.apache.activemq.util.ByteSequence@1a881cc, >>>>>>>>> marshalledProperties = null, dataStructure = null, >>>>>>>>> redeliveryCounter = 0, size = 0, properties = null, >>>>>>>>> readOnlyProperties = true, readOnlyBody = true, droppable = >>>>>>>>> false}, redeliveryCounter = 0} >>>>>>>>> >>>>>>>>> I'll need to do more investigations tomorrow, but if >>>>>>>>> anybody has any ideas, I'd appreciate some insights. >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Cheers, >>>>>>>>> David >>>>>>>>> >>>>>>>>> Nuix Pty Ltd >>>>>>>>> Suite 79, 89 Jones St, Ultimo NSW 2007, Australia Ph: >>>>>>>>> +61 2 9280 0699 >>>>>>>>> Web: http://www.nuix.com Fax: >>>>>>>>> +61 2 9212 6902 >>>>>> >>>>>> >>>>>> -- >>>>>> Cheers, >>>>>> David >>>>>> >>>>>> Nuix Pty Ltd >>>>>> Suite 79, 89 Jones St, Ultimo NSW 2007, Australia Ph: +61 2 >>>>>> 9280 0699 >>>>>> Web: http://www.nuix.com Fax: +61 2 >>>>>> 9212 6902 >>>> >>>> >>>> -- >>>> Cheers, >>>> David >>>> >>>> Nuix Pty Ltd >>>> Suite 79, 89 Jones St, Ultimo NSW 2007, Australia Ph: +61 2 >>>> 9280 0699 >>>> Web: http://www.nuix.com Fax: +61 2 >>>> 9212 6902 > > > -- > Cheers, > David > > Nuix Pty Ltd > Suite 79, 89 Jones St, Ultimo NSW 2007, Australia Ph: +61 2 9280 > 0699 > Web: http://www.nuix.com Fax: +61 2 9212 > 6902