Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-3157

Garbage collecting inactive destinations does not work with queue mirroring

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.4.2
    • 5.6.0
    • Broker
    • None
    • Windows 2003 Server, Java JDK 1.6

    Description

      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:

      <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>
      

      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.

      Attachments

        1. AMQ3157Test.java
          7 kB
          Timothy A. Bish
        2. AMQ3157Test.java
          6 kB
          Timothy A. Bish

        Activity

          People

            Unassigned Unassigned
            jgomes Jim Gomes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: