Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-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 0159010A15 for ; Thu, 1 Aug 2013 23:18:56 +0000 (UTC) Received: (qmail 66603 invoked by uid 500); 1 Aug 2013 23:18:55 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 66578 invoked by uid 500); 1 Aug 2013 23:18:55 -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 66570 invoked by uid 99); 1 Aug 2013 23:18:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Aug 2013 23:18:55 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of christian.posta@gmail.com designates 209.85.217.173 as permitted sender) Received: from [209.85.217.173] (HELO mail-lb0-f173.google.com) (209.85.217.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Aug 2013 23:18:49 +0000 Received: by mail-lb0-f173.google.com with SMTP id 10so1977757lbf.4 for ; Thu, 01 Aug 2013 16:18:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=E2iH5M5hXeNo1ctzI7LULdzjPc90pug4CZdyn7q3wuQ=; b=hyBNAWVxJeDqh+dRz5DmYT9ZfsobTjMA0JjjpjZ40zh0WxrgfAqJSlI6Zx7o6vyOb7 FmeydjJd1zH5VVtr4ygv7RrryeK0FN369KmOAxnxSfkNc40wwmT4DGWJ/lI7Ii+JsC5f 7RM/1MI4Lluux5cX5H7J3gXs9SnZYm09M2nZwVBdsNVmyaETYCVbT7Sdg49FYbZ28gi+ FKo1J1NBsaDGezT+AfUNwhMd0FzBwqhECiPG6+aZylLcstqzyz3U+G7vybu9sTfh+WIH xpXDNsT2rgBsfNDRnrK70SeO3e0I+xhwphiIbENNEtcsmQxN/m4+F4jNnCXlB6IARyh9 SvvA== MIME-Version: 1.0 X-Received: by 10.112.11.50 with SMTP id n18mr2307609lbb.57.1375399109459; Thu, 01 Aug 2013 16:18:29 -0700 (PDT) Received: by 10.114.2.239 with HTTP; Thu, 1 Aug 2013 16:18:29 -0700 (PDT) In-Reply-To: <1375397810293-4670029.post@n4.nabble.com> References: <1374680070156-4669679.post@n4.nabble.com> <1375058415828-4669819.post@n4.nabble.com> <1375114612647-4669838.post@n4.nabble.com> <1375225948718-4669896.post@n4.nabble.com> <1375375672931-4670001.post@n4.nabble.com> <1375397810293-4670029.post@n4.nabble.com> Date: Thu, 1 Aug 2013 16:18:29 -0700 Message-ID: Subject: Re: cursor memory usage/limit vs memory usage/limit From: Christian Posta To: "users@activemq.apache.org" Content-Type: multipart/alternative; boundary=001a1133fb5458047004e2eb0f02 X-Virus-Checked: Checked by ClamAV on apache.org --001a1133fb5458047004e2eb0f02 Content-Type: text/plain; charset=ISO-8859-1 Just tried that on my side and didn't make a difference. BTW, i've committed the test to a private branch here: https://github.com/christian-posta/activemq-durable-sub-pfc-tests/tree/jake-choi-tests On Thu, Aug 1, 2013 at 3:56 PM, Jake Choi wrote: > I just got a pretty interesting observation: I just tried my own tweaked > PendingDurableSubscriberPolicy (as I learned from the other thread, see > below) to the test code I've been using: > > > http://activemq.2283324.n4.nabble.com/How-to-configure-this-combination-of-queue-cursors-tt4670003.html#a4670027 > > Then, the test code went through: MemoryLimitTest.java > > > ----- > > Let's explain what's happened again in the test code above, shortly. With > only durable subscriber with prefetchSize=0, persistent message publishing > to the topic is blocked (PFC) by hitting per-destination memory limit > (1MB). > But, when I changed the PendingDurableSubscriberPolicy from the default > "StorePendingDurableSubscriberMessageStoragePolicy" to the customized one > (see below), persistent message publishing didn't get stuck by any PFC but > went through very well. > > > // This makes the test flow through! > // Without this (with default > StorePendingDurableSubscriberMessageStoragePolicy), > // persistent message publishing to the topic got stuck. Why?? > policyEntry.setPendingDurableSubscriberPolicy(new > StorePendingDurableSubscriberMessageStoragePolicy() { > @Override > public PendingMessageCursor > getSubscriberPendingMessageCursor(Broker broker, String clientId, String > name, > int maxBatchSize, DurableTopicSubscription sub) { > broker.getBrokerService().setPersistent(false); > StoreDurableSubscriberCursor cursor = > (StoreDurableSubscriberCursor) super > .getSubscriberPendingMessageCursor(broker, > clientId, > name, maxBatchSize, sub); > broker.getBrokerService().setPersistent(true); > return cursor; > } > }); > > > I'm curious what difference is there between these two > "PendingDurableSubscriberPolicy"s particularly for the persistent pending > cursor used inside.. Strange.. > > > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/cursor-memory-usage-limit-vs-memory-usage-limit-tp4669679p4670029.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > -- *Christian Posta* http://www.christianposta.com/blog twitter: @christianposta --001a1133fb5458047004e2eb0f02--