Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 7634 invoked from network); 21 Nov 2007 15:20:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Nov 2007 15:20:03 -0000 Received: (qmail 1059 invoked by uid 500); 21 Nov 2007 15:19:51 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 721 invoked by uid 500); 21 Nov 2007 15:19:50 -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 712 invoked by uid 99); 21 Nov 2007 15:19:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Nov 2007 07:19:50 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of james.strachan@gmail.com designates 64.233.166.176 as permitted sender) Received: from [64.233.166.176] (HELO py-out-1112.google.com) (64.233.166.176) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Nov 2007 15:19:51 +0000 Received: by py-out-1112.google.com with SMTP id p76so7895044pyb for ; Wed, 21 Nov 2007 07:19:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=rJwJwP9jOBqDwnIGXB/GET9rP2spwZSqIGlt8gDabK0=; b=AKI3JHI2FGQnm5vdIXsE7g4ic6iy2twUE6SoIKfKK4CxYQeCwk6r92UEgUNSLVEDhByez/Swl8DfGoQxSmy6Xbqv3/Shqkd8+Pk24iw8k3uBitAP/DIpgCvsLY9pZFm6WoDUoYFiQkGzdTp7jQTM1Id/394feAjS8LyXD+bh3T4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=gBB4TxQtpyQr/eo1zjI9+H7ysq3t+kdWP5j6XbF6zg5B8LMZLW59AICQQWSKvj4UcUBp+md9CBBxgbHpUB0lPgXuuJA/o26Mn71mgjZ1NsyIbgjzN9rscfjz+ArW++04H/Fe0si7zJsKuVdkgkexFQYrHVgXN1z9Ly902mW2SWo= Received: by 10.65.96.6 with SMTP id y6mr17046718qbl.1195658359828; Wed, 21 Nov 2007 07:19:19 -0800 (PST) Received: by 10.65.204.2 with HTTP; Wed, 21 Nov 2007 07:19:19 -0800 (PST) Message-ID: Date: Wed, 21 Nov 2007 15:19:19 +0000 From: "James Strachan" To: users@activemq.apache.org Subject: Re: VirtualTopic and persistency problem In-Reply-To: <13877860.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <13877860.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org BTW are you positive that the consumer queues are actually created in each of the test cases you're doing? i.e. when you start/stop the broker are they created up front before you send any messages? If not you might wanna use this... http://activemq.apache.org/configure-startup-destinations.html On 21/11/2007, kwark wrote: > > I have a problem with VirtualTopics and persistency. > > Consider the following setup: > > I have a producer which produces messages to virtualtopic: > VirtualTopic.mytopic > I have a manager with an embedded broker and two statically defined queues: > Consumer.module1.VirtualTopic.mytopic and > Consumer.module2.VirtualTopic.mytopic > I have two consumers, one for each queue defined above > > Now everything works fine as expected as long as the broker stays online: > producer produces messages and even when one of the consumers goes down, it > receives all produced messages as soon as it comes back online. Cool! > > Consider now the following scenario: > 1) I start the manager with embedded broker, I start the consumer for > module1 and the producer. > 2) I let this run for a while and then I first stop the consumer and then > the producer. At this moment consumer for module1 has received all the > produced messages, but consumer for module2 was never started and did not > receive any of the produced messages. This can also be seen from inspection > of the queues through JMX: queue Consumer.module2.VirtualTopic.mytopic still > has x messages in its queue. > 3) Now I stop and restart the manager (broker). During restart I see a > Warning message that the referenceStore is not valid and AMQ is recovering. > It also logs that it has recovered x operations from redo log. > 4) I also start the consumer for module2, however it never receives the > messages produced before the broker restarted. > > Is this known behaviour? Did I forget to do something special? > > Some more information. This was tested with both AMQ 4.1 and latest 5.0 > snapshot. None of them produced the desired result. I use JMS transactions > and producer is set to produce persistent messages. > > I did some debugging when the broker starts and the recovered messages from > the redo log are messages of the VirtualTopic.mytopic topic. These messages > are recovered and AMQ tries to add them to the reference store for that > topic, which is a KahaTopicReferenceStore. When I look at the implementation > of addMessageReference I see that it checks the subscriberCount of the topic > and only adds it to the store when this is > 0. If I check the > VirtualTopic.mytopic with JMX I can see that this is 0, so it never gets > added back to the topics reference store. > > Can anyone provide some more insight on how to get persistency working > correctly with VirtualTopics? > > > > > > > > -- > View this message in context: http://www.nabble.com/VirtualTopic-and-persistency-problem-tf4850349s2354.html#a13877860 > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://open.iona.com