Return-Path: X-Original-To: apmail-qpid-users-archive@www.apache.org Delivered-To: apmail-qpid-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9259E10E3D for ; Fri, 4 Sep 2015 08:09:47 +0000 (UTC) Received: (qmail 58519 invoked by uid 500); 4 Sep 2015 08:09:47 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 58481 invoked by uid 500); 4 Sep 2015 08:09:47 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 58459 invoked by uid 99); 4 Sep 2015 08:09:46 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Sep 2015 08:09:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 68039182107 for ; Fri, 4 Sep 2015 08:09:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.773 X-Spam-Level: X-Spam-Status: No, score=0.773 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.006, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id MBMz44TM0Fy5 for ; Fri, 4 Sep 2015 08:09:38 +0000 (UTC) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id BE47820F1E for ; Fri, 4 Sep 2015 08:09:38 +0000 (UTC) Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 29BE6C0AAB04 for ; Fri, 4 Sep 2015 08:09:38 +0000 (UTC) Received: from [10.36.116.116] (ovpn-116-116.ams2.redhat.com [10.36.116.116]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8489aGj027515 for ; Fri, 4 Sep 2015 04:09:37 -0400 Message-ID: <55E95275.3070500@redhat.com> Date: Fri, 04 Sep 2015 09:12:37 +0100 From: Gordon Sim Organization: Red Hat UK Ltd, Registered in England and Wales under Company Registration No. 3798903, Directors: Michael Cunningham (USA), Matt Parsons (USA), Charlie Peters (USA), Michael O'Neill (Ireland) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: users@qpid.apache.org Subject: Re: How to make Qpid broker persistent? References: <55E89AE7.9030804@redhat.com> <55E89FA2.5010608@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 On 09/03/2015 09:54 PM, jjw tectec wrote: > Hi Gordon, > > Thanks so much for your help. I think I got this to work partially now. > The Linear Store inside the broker seems to be working, because I see the > below messages: > 2015-09-03 15:39:58 [Store] info Linear Store: Most recent persistence id > found: 0x0 > 2015-09-03 15:39:58 [Store] info Linear Store: Recovered exchange > "topic.xxx" > > However, if I create a durable exchange and send durable messages to it, > and then shutdown the broker, and restart the broker. The broker did not > retain those messages. Please see the commands and queue statistics below. > What did I do wrong? Exchanges don't store messages, they merely route them to any matching bound queues. It is queues which store the messages. So e.g. if you do: qpid-config -a localhost:5672 --durable add queue my-queue and then sent the message to that instead of the exchange, you should see a message in the queue before and after restart (qpid-stat -q). If you want to keep the publisher sending to an exchange, you can bind a queue to that exchange. This is done automatically if you create a receiver from the exchange, but by default the subscription queue would not be durable. For a durable subscription you would specify "topic.xxx; {link:{name:my-sub,durable:True}}". > ./qpid-config -a localhost:5672 --durable add exchange topic topic.xxx > inside the publisher code, I did: > Message msg = Message(s); > msg.setDurable(1); > sender.send(msg); > Aggregate Broker Statistics: (BEFORE shutdown) > Statistic Messages Bytes > ============================================= > queue-depth 0 0 > total-enqueues 3 627 > total-dequeues 3 627 > persistent-enqueues 3 627 > persistent-dequeues 3 627 > > > Aggregate Broker Statistics: (AFTER shutdown) > Statistic Messages Bytes > ============================================= > queue-depth 0 0 > total-enqueues 0 0 > total-dequeues 0 0 > persistent-enqueues 0 0 > persistent-dequeues 0 0 > > Thanks > jjw --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For additional commands, e-mail: users-help@qpid.apache.org