From users-return-22551-apmail-activemq-users-archive=activemq.apache.org@activemq.apache.org Fri Feb 19 22:01:38 2010 Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 19132 invoked from network); 19 Feb 2010 22:01:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Feb 2010 22:01:38 -0000 Received: (qmail 53461 invoked by uid 500); 19 Feb 2010 22:01:37 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 53414 invoked by uid 500); 19 Feb 2010 22:01:37 -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 53404 invoked by uid 99); 19 Feb 2010 22:01:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Feb 2010 22:01:37 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bruce.snyder@gmail.com designates 209.85.220.222 as permitted sender) Received: from [209.85.220.222] (HELO mail-fx0-f222.google.com) (209.85.220.222) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Feb 2010 22:01:27 +0000 Received: by fxm22 with SMTP id 22so660618fxm.6 for ; Fri, 19 Feb 2010 14:01:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Qpauv9Uhd7+swKYyLoypYhFAkA/ORTO3xFOMSPvAL4w=; b=YGrmzuR9mTVEFevhkq1m5u7dGi8lWVSfPOdVOl4I0q8rgLCD1GlLLfBGaC5GXcYhx8 nfM7uUHosZQeIpDyypv+op63Bpxw7m7lGvWf4M4LvZ5i/Vo69fgfb+nrPRkicm4zcyQL L9Y80VVrhPDOAG/zUOYzP4XxueivxG6dtL7h0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=xqRgOqLiNXUHLGQl7sOwaslyNAyvu2ID+/8Yv/lGeZzHtP1FmJAl745JlNSeFDoN54 H0wGU3Jusht6N/fs1WqLAmVekFH1AOVC2WyH6C1ZQAteYdK/QI/LtR4BNKlgaXFOMUpl z6HitVv8aTT153bU87h6Kl02IXV/B5JlrlGdE= MIME-Version: 1.0 Received: by 10.223.97.220 with SMTP id m28mr7571035fan.36.1266616866639; Fri, 19 Feb 2010 14:01:06 -0800 (PST) In-Reply-To: <27660206.post@talk.nabble.com> References: <27660206.post@talk.nabble.com> Date: Fri, 19 Feb 2010 15:01:06 -0700 Message-ID: <7b3355cb1002191401g397380ecx134481566c65c933@mail.gmail.com> Subject: Re: Persistence not working From: Bruce Snyder To: users@activemq.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Feb 19, 2010 at 2:03 PM, Wxman wrote: > > I'm using AMQ 5.3.0... =A0My programs successfully send and receive messa= ges > through the broker. =A0However, this only happens for messages sent after= its > launch. =A0Messages that were submitted *prior* to my app's launch are *n= ot* > received. =A0My understanding of persistence is that this is the point of > persistence, i.e., messages handled by ActiveMQ prior to my app launching > would still be passed to my app once it launches, right? > > I have the persistence flag turned on in the code and in the activemq.xml > file. =A0And I recently moved to the new KahaDB datastore, but this had n= o > apparent impact on the problem. > > Most of ActiveMQ's configuration and its capabilities are over my head an= d > so I still consider myself an ActiveMQ newbie despite that I have my apps > successfully communicating via ActiveMQ (at least, for live messages). > > Obviously, something is configured improperly; otherwise, getting older > messages would work. =A0Is there a checklist of item I can review to dete= rmine > what configuration step may not be set right? The default configuration in ActiveMQ 5.3 will persist messages using KahaD= B: http://activemq.apache.org/kahadb.html This will persist messages between broker restarts. But this will only work if the messages are marked for persistence by the message producer: MessageProducer.setDeliveryMode(DeliveryMode.PERSISTENT); For more info, see the following: http://java.sun.com/j2ee/1.4/docs/api/javax/jms/MessageProducer.html#setDel= iveryMode(int) Bruce --=20 perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=3D6-E+G-N>61E