You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Jim Gomes (JIRA)" <ji...@apache.org> on 2011/01/25 21:27:44 UTC

[jira] Created: (AMQ-3157) Garbage collecting inactive destinations does not work with queue mirroring

Garbage collecting inactive destinations does not work with queue mirroring
---------------------------------------------------------------------------

                 Key: AMQ-3157
                 URL: https://issues.apache.org/jira/browse/AMQ-3157
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.4.2
         Environment: Windows 2003 Server, Java JDK 1.6
            Reporter: Jim Gomes
            Priority: Minor
             Fix For: 5.5.0


When using the garbage collection feature of inactive queues, the queues are not collected if queue mirroring is turned on.  The following snippet shows a basic configuration for reproducing the problem:

{code:xml}
<broker xmlns="http://activemq.apache.org/schema/core"
          brokerName="localhost"
          dataDirectory="${activemq.base}/data"
          destroyApplicationContextOnStop="true"
          schedulePeriodForDestinationPurge="10000">

        <destinationInterceptors>
            <mirroredQueue copyMessage="true" postfix="" prefix="Monitor."/>
        </destinationInterceptors>

        <destinationPolicy>
            <policyMap>
                <policyEntries>
                    <!-- Set auto-cleanup of inactive topics and queues -->
                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="50mb" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000">
                        <pendingQueuePolicy>
                            <vmQueueCursor/>
                        </pendingQueuePolicy>
                    </policyEntry>
                    <policyEntry topic=">" producerFlowControl="true" memoryLimit="50mb" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000">
                        <pendingSubscriberPolicy>
                            <vmCursor />
                        </pendingSubscriberPolicy>
                    </policyEntry>
                </policyEntries>
            </policyMap>
        </destinationPolicy>
</broker>
{code}

With this configuration, the topics will be collected, but the queues will not be collected.  In order to get the queues to be collected, the {{<destinationInterceptors>}} section needs to be commented out.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Commented] (AMQ-3157) Garbage collecting inactive destinations does not work with queue mirroring

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060755#comment-13060755 ] 

Timothy Bish commented on AMQ-3157:
-----------------------------------

Would be great if you could throw together a JUnit test for this.

> Garbage collecting inactive destinations does not work with queue mirroring
> ---------------------------------------------------------------------------
>
>                 Key: AMQ-3157
>                 URL: https://issues.apache.org/jira/browse/AMQ-3157
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.2
>         Environment: Windows 2003 Server, Java JDK 1.6
>            Reporter: Jim Gomes
>            Priority: Minor
>             Fix For: 5.6.0
>
>
> When using the garbage collection feature of inactive queues, the queues are not collected if queue mirroring is turned on.  The following snippet shows a basic configuration for reproducing the problem:
> {code:xml}
> <broker xmlns="http://activemq.apache.org/schema/core"
>           brokerName="localhost"
>           dataDirectory="${activemq.base}/data"
>           destroyApplicationContextOnStop="true"
>           schedulePeriodForDestinationPurge="10000">
>         <destinationInterceptors>
>             <mirroredQueue copyMessage="true" postfix="" prefix="Monitor."/>
>         </destinationInterceptors>
>         <destinationPolicy>
>             <policyMap>
>                 <policyEntries>
>                     <!-- Set auto-cleanup of inactive topics and queues -->
>                     <policyEntry queue=">" producerFlowControl="true" memoryLimit="50mb" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000">
>                         <pendingQueuePolicy>
>                             <vmQueueCursor/>
>                         </pendingQueuePolicy>
>                     </policyEntry>
>                     <policyEntry topic=">" producerFlowControl="true" memoryLimit="50mb" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000">
>                         <pendingSubscriberPolicy>
>                             <vmCursor />
>                         </pendingSubscriberPolicy>
>                     </policyEntry>
>                 </policyEntries>
>             </policyMap>
>         </destinationPolicy>
> </broker>
> {code}
> With this configuration, the topics will be collected, but the queues will not be collected.  In order to get the queues to be collected, the {{<destinationInterceptors>}} section needs to be commented out.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQ-3157) Garbage collecting inactive destinations does not work with queue mirroring

Posted by "Darius Schier (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13154948#comment-13154948 ] 

Darius Schier commented on AMQ-3157:
------------------------------------

Not sure if we have exactly the same problem but it looks pretty familiar.
We gave the snapshot a try, unfortunately we still have very similar problems as described by Jim.
Same as above: GC seems to work fine with destinations that are available after restart but not with dynamically created ones.
Also queues that were created before restart dynamically and still have some load work fine (as the server creates them on startup).

Here is our configuration.

{code:xml}
<destinationInterceptors>
  <mirroredQueue copyMessage = "true" postfix=".qmirror" prefix=""/>
</destinationInterceptors>
<destinationPolicy>
  <policyMap>
    <policyEntries>
      <policyEntry topic="testQueue.>" producerFlowControl="false" memoryLimit="1 mb" optimizedDispatch="true"></policyEntry>
      <policyEntry queue="testQueue.>" producerFlowControl="false" memoryLimit="1 mb" optimizedDispatch="true"></policyEntry>
    </policyEntries>
  </policyMap>
</destinationPolicy>

<persistenceAdapter>
  <kahaDB directory="${activemq.base}/data/kahadb"/>
</persistenceAdapter>

<systemUsage>
  <systemUsage>
    <memoryUsage>
      <memoryUsage limit="10 mb"/>
    </memoryUsage>
    <storeUsage>
      <storeUsage limit="10 gb"/>
    </storeUsage>
    <tempUsage>
      <tempUsage limit="10 mb"/>
    </tempUsage>
  </systemUsage>
</systemUsage>
{code} 

Would you mind to reopen this issue? 
We use mirrors a lot. From our point of view this could lead to OOM, so we think the priority could/should be increased.

Regards
Darius
                
> Garbage collecting inactive destinations does not work with queue mirroring
> ---------------------------------------------------------------------------
>
>                 Key: AMQ-3157
>                 URL: https://issues.apache.org/jira/browse/AMQ-3157
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.2
>         Environment: Windows 2003 Server, Java JDK 1.6
>            Reporter: Jim Gomes
>            Priority: Minor
>             Fix For: 5.6.0
>
>         Attachments: AMQ3157Test.java, AMQ3157Test.java
>
>
> When using the garbage collection feature of inactive queues, the queues are not collected if queue mirroring is turned on.  The following snippet shows a basic configuration for reproducing the problem:
> {code:xml}
> <broker xmlns="http://activemq.apache.org/schema/core"
>           brokerName="localhost"
>           dataDirectory="${activemq.base}/data"
>           destroyApplicationContextOnStop="true"
>           schedulePeriodForDestinationPurge="10000">
>         <destinationInterceptors>
>             <mirroredQueue copyMessage="true" postfix="" prefix="Monitor."/>
>         </destinationInterceptors>
>         <destinationPolicy>
>             <policyMap>
>                 <policyEntries>
>                     <!-- Set auto-cleanup of inactive topics and queues -->
>                     <policyEntry queue=">" producerFlowControl="true" memoryLimit="50mb" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000">
>                         <pendingQueuePolicy>
>                             <vmQueueCursor/>
>                         </pendingQueuePolicy>
>                     </policyEntry>
>                     <policyEntry topic=">" producerFlowControl="true" memoryLimit="50mb" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000">
>                         <pendingSubscriberPolicy>
>                             <vmCursor />
>                         </pendingSubscriberPolicy>
>                     </policyEntry>
>                 </policyEntries>
>             </policyMap>
>         </destinationPolicy>
> </broker>
> {code}
> With this configuration, the topics will be collected, but the queues will not be collected.  In order to get the queues to be collected, the {{<destinationInterceptors>}} section needs to be commented out.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (AMQ-3157) Garbage collecting inactive destinations does not work with queue mirroring

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish updated AMQ-3157:
------------------------------

    Attachment: AMQ3157Test.java

Created a little test case to demonstrate the issue.

> Garbage collecting inactive destinations does not work with queue mirroring
> ---------------------------------------------------------------------------
>
>                 Key: AMQ-3157
>                 URL: https://issues.apache.org/jira/browse/AMQ-3157
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.2
>         Environment: Windows 2003 Server, Java JDK 1.6
>            Reporter: Jim Gomes
>            Priority: Minor
>             Fix For: 5.6.0
>
>         Attachments: AMQ3157Test.java
>
>
> When using the garbage collection feature of inactive queues, the queues are not collected if queue mirroring is turned on.  The following snippet shows a basic configuration for reproducing the problem:
> {code:xml}
> <broker xmlns="http://activemq.apache.org/schema/core"
>           brokerName="localhost"
>           dataDirectory="${activemq.base}/data"
>           destroyApplicationContextOnStop="true"
>           schedulePeriodForDestinationPurge="10000">
>         <destinationInterceptors>
>             <mirroredQueue copyMessage="true" postfix="" prefix="Monitor."/>
>         </destinationInterceptors>
>         <destinationPolicy>
>             <policyMap>
>                 <policyEntries>
>                     <!-- Set auto-cleanup of inactive topics and queues -->
>                     <policyEntry queue=">" producerFlowControl="true" memoryLimit="50mb" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000">
>                         <pendingQueuePolicy>
>                             <vmQueueCursor/>
>                         </pendingQueuePolicy>
>                     </policyEntry>
>                     <policyEntry topic=">" producerFlowControl="true" memoryLimit="50mb" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000">
>                         <pendingSubscriberPolicy>
>                             <vmCursor />
>                         </pendingSubscriberPolicy>
>                     </policyEntry>
>                 </policyEntries>
>             </policyMap>
>         </destinationPolicy>
> </broker>
> {code}
> With this configuration, the topics will be collected, but the queues will not be collected.  In order to get the queues to be collected, the {{<destinationInterceptors>}} section needs to be commented out.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (AMQ-3157) Garbage collecting inactive destinations does not work with queue mirroring

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish updated AMQ-3157:
------------------------------

    Attachment: AMQ3157Test.java

Updated test, old version wasn't quite right.

> Garbage collecting inactive destinations does not work with queue mirroring
> ---------------------------------------------------------------------------
>
>                 Key: AMQ-3157
>                 URL: https://issues.apache.org/jira/browse/AMQ-3157
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.2
>         Environment: Windows 2003 Server, Java JDK 1.6
>            Reporter: Jim Gomes
>            Priority: Minor
>             Fix For: 5.6.0
>
>         Attachments: AMQ3157Test.java, AMQ3157Test.java
>
>
> When using the garbage collection feature of inactive queues, the queues are not collected if queue mirroring is turned on.  The following snippet shows a basic configuration for reproducing the problem:
> {code:xml}
> <broker xmlns="http://activemq.apache.org/schema/core"
>           brokerName="localhost"
>           dataDirectory="${activemq.base}/data"
>           destroyApplicationContextOnStop="true"
>           schedulePeriodForDestinationPurge="10000">
>         <destinationInterceptors>
>             <mirroredQueue copyMessage="true" postfix="" prefix="Monitor."/>
>         </destinationInterceptors>
>         <destinationPolicy>
>             <policyMap>
>                 <policyEntries>
>                     <!-- Set auto-cleanup of inactive topics and queues -->
>                     <policyEntry queue=">" producerFlowControl="true" memoryLimit="50mb" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000">
>                         <pendingQueuePolicy>
>                             <vmQueueCursor/>
>                         </pendingQueuePolicy>
>                     </policyEntry>
>                     <policyEntry topic=">" producerFlowControl="true" memoryLimit="50mb" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000">
>                         <pendingSubscriberPolicy>
>                             <vmCursor />
>                         </pendingSubscriberPolicy>
>                     </policyEntry>
>                 </policyEntries>
>             </policyMap>
>         </destinationPolicy>
> </broker>
> {code}
> With this configuration, the topics will be collected, but the queues will not be collected.  In order to get the queues to be collected, the {{<destinationInterceptors>}} section needs to be commented out.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (AMQ-3157) Garbage collecting inactive destinations does not work with queue mirroring

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish resolved AMQ-3157.
-------------------------------

    Resolution: Fixed

fix applied in trunk.

> Garbage collecting inactive destinations does not work with queue mirroring
> ---------------------------------------------------------------------------
>
>                 Key: AMQ-3157
>                 URL: https://issues.apache.org/jira/browse/AMQ-3157
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.2
>         Environment: Windows 2003 Server, Java JDK 1.6
>            Reporter: Jim Gomes
>            Priority: Minor
>             Fix For: 5.6.0
>
>         Attachments: AMQ3157Test.java, AMQ3157Test.java
>
>
> When using the garbage collection feature of inactive queues, the queues are not collected if queue mirroring is turned on.  The following snippet shows a basic configuration for reproducing the problem:
> {code:xml}
> <broker xmlns="http://activemq.apache.org/schema/core"
>           brokerName="localhost"
>           dataDirectory="${activemq.base}/data"
>           destroyApplicationContextOnStop="true"
>           schedulePeriodForDestinationPurge="10000">
>         <destinationInterceptors>
>             <mirroredQueue copyMessage="true" postfix="" prefix="Monitor."/>
>         </destinationInterceptors>
>         <destinationPolicy>
>             <policyMap>
>                 <policyEntries>
>                     <!-- Set auto-cleanup of inactive topics and queues -->
>                     <policyEntry queue=">" producerFlowControl="true" memoryLimit="50mb" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000">
>                         <pendingQueuePolicy>
>                             <vmQueueCursor/>
>                         </pendingQueuePolicy>
>                     </policyEntry>
>                     <policyEntry topic=">" producerFlowControl="true" memoryLimit="50mb" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000">
>                         <pendingSubscriberPolicy>
>                             <vmCursor />
>                         </pendingSubscriberPolicy>
>                     </policyEntry>
>                 </policyEntries>
>             </policyMap>
>         </destinationPolicy>
> </broker>
> {code}
> With this configuration, the topics will be collected, but the queues will not be collected.  In order to get the queues to be collected, the {{<destinationInterceptors>}} section needs to be commented out.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (AMQ-3157) Garbage collecting inactive destinations does not work with queue mirroring

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully updated AMQ-3157:
----------------------------

    Fix Version/s:     (was: 5.5.0)
                   5.6.0

> Garbage collecting inactive destinations does not work with queue mirroring
> ---------------------------------------------------------------------------
>
>                 Key: AMQ-3157
>                 URL: https://issues.apache.org/jira/browse/AMQ-3157
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.2
>         Environment: Windows 2003 Server, Java JDK 1.6
>            Reporter: Jim Gomes
>            Priority: Minor
>             Fix For: 5.6.0
>
>
> When using the garbage collection feature of inactive queues, the queues are not collected if queue mirroring is turned on.  The following snippet shows a basic configuration for reproducing the problem:
> {code:xml}
> <broker xmlns="http://activemq.apache.org/schema/core"
>           brokerName="localhost"
>           dataDirectory="${activemq.base}/data"
>           destroyApplicationContextOnStop="true"
>           schedulePeriodForDestinationPurge="10000">
>         <destinationInterceptors>
>             <mirroredQueue copyMessage="true" postfix="" prefix="Monitor."/>
>         </destinationInterceptors>
>         <destinationPolicy>
>             <policyMap>
>                 <policyEntries>
>                     <!-- Set auto-cleanup of inactive topics and queues -->
>                     <policyEntry queue=">" producerFlowControl="true" memoryLimit="50mb" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000">
>                         <pendingQueuePolicy>
>                             <vmQueueCursor/>
>                         </pendingQueuePolicy>
>                     </policyEntry>
>                     <policyEntry topic=">" producerFlowControl="true" memoryLimit="50mb" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000">
>                         <pendingSubscriberPolicy>
>                             <vmCursor />
>                         </pendingSubscriberPolicy>
>                     </policyEntry>
>                 </policyEntries>
>             </policyMap>
>         </destinationPolicy>
> </broker>
> {code}
> With this configuration, the topics will be collected, but the queues will not be collected.  In order to get the queues to be collected, the {{<destinationInterceptors>}} section needs to be commented out.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira