activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jake Choi>
Subject Re: cursor memory usage/limit vs memory usage/limit
Date Thu, 01 Aug 2013 22:56:50 GMT
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:

Then, the test code went through:


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
        // persistent message publishing to the topic got stuck. Why??
StorePendingDurableSubscriberMessageStoragePolicy() {
            public PendingMessageCursor
getSubscriberPendingMessageCursor(Broker broker, String clientId, String
                    int maxBatchSize, DurableTopicSubscription sub) {
                StoreDurableSubscriberCursor cursor =
(StoreDurableSubscriberCursor) super
                        .getSubscriberPendingMessageCursor(broker, clientId,
name, maxBatchSize, sub);
                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:
Sent from the ActiveMQ - User mailing list archive at

View raw message