From activemq-dev-return-715-apmail-geronimo-activemq-dev-archive=geronimo.apache.org@geronimo.apache.org Mon Apr 10 17:04:32 2006 Return-Path: Delivered-To: apmail-geronimo-activemq-dev-archive@www.apache.org Received: (qmail 14053 invoked from network); 10 Apr 2006 17:04:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Apr 2006 17:04:31 -0000 Received: (qmail 38240 invoked by uid 500); 10 Apr 2006 17:04:21 -0000 Delivered-To: apmail-geronimo-activemq-dev-archive@geronimo.apache.org Received: (qmail 38192 invoked by uid 500); 10 Apr 2006 17:04:21 -0000 Mailing-List: contact activemq-dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-dev@geronimo.apache.org Delivered-To: mailing list activemq-dev@geronimo.apache.org Received: (qmail 38026 invoked by uid 99); 10 Apr 2006 17:04:20 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Apr 2006 10:04:20 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=FORGED_HOTMAIL_RCVD2,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of lists@nabble.com designates 72.21.53.35 as permitted sender) Received: from [72.21.53.35] (HELO talk.nabble.com) (72.21.53.35) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Apr 2006 10:04:18 -0700 Received: from localhost ([127.0.0.1] helo=talk.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1FSznx-0002Mi-MC for activemq-dev@geronimo.apache.org; Mon, 10 Apr 2006 10:03:57 -0700 Message-ID: <3845965.post@talk.nabble.com> Date: Mon, 10 Apr 2006 10:03:57 -0700 (PDT) From: ErinO To: activemq-dev@geronimo.apache.org Subject: ActiveMQ 4.0 RC1 - durable topic MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-Sender: ErinOceng@hotmail.com X-Nabble-From: ErinO X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N hi, I run the example program ProducerTool.java/ConsumerTool.java with 4.0 RC1, I created a durable topic and used ProducerTool to send 10 messages to broker, then run ConsumerTool, but it couldn't receive any messages. I debug into the code, looks like in Topic.java: if (store != null && message.isPersistent() && !canOptimizeOutPersistence() ) store.addMessage(context, message); ... private boolean canOptimizeOutPersistence() { return durableSubcribers.size()==0; } As the broker is new, there is no durable subscriber, none of the message get added to message store, that is why when running ConsumerTool.java, it couldn't receive any messages. If I restart broker, all those durable messages will get lost. Is this a known issue? Thanks Erin -- View this message in context: http://www.nabble.com/ActiveMQ-4.0-RC1---durable-topic-t1426256.html#a3845965 Sent from the ActiveMQ - Dev forum at Nabble.com.