You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Anand Verma (JIRA)" <ji...@apache.org> on 2014/06/11 19:49:07 UTC

[jira] [Commented] (AMQ-5222) Issue with Purge Inactive Destination feature

    [ https://issues.apache.org/jira/browse/AMQ-5222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14028101#comment-14028101 ] 

Anand Verma commented on AMQ-5222:
----------------------------------

Modifying BaseDestination->canGC() for additional Condition ! isActive() seems to work to my expectation but not sure if this should be the fix based on just  semantic of code.
public boolean canGC() {
        boolean result = false;
        if (isGcIfInactive()&& this.lastActiveTime != 0l && ! isActive()) {
            if ((System.currentTimeMillis() - this.lastActiveTime) >= getInactiveTimoutBeforeGC()) {
                result = true;
            }
        }
        return result;
    }


> Issue with Purge Inactive Destination feature
> ---------------------------------------------
>
>                 Key: AMQ-5222
>                 URL: https://issues.apache.org/jira/browse/AMQ-5222
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.9.1
>         Environment: Windows 7. JDK1.6
>            Reporter: Anand Verma
>
> I enabled deletion of Inactive Queue for POC every 10 seconds
> <policyEntry queue=">" producerFlowControl="true" memoryLimit="20mb"   gcInactiveDestinations="true" inactiveTimoutBeforeGC="10000">.
> Now I start a Consumer Listener process..The Queue is created and then it is deleted though Consumer is still running and Active..I would expect this to should not be deleted as it still has active Queue
> Looking @ code BaseDestination->markForGC(long timeStamp) & BaseDestination->canGC() seems to be suspect based on usage from RegionBroker->purgeInactiveDestinations



--
This message was sent by Atlassian JIRA
(v6.2#6252)