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

ActiveMQ.Advisory.xxxxxx.TempQueue.xxx, AMQ.A.xxx.Queue.xxx and AMQ.A.xxx.Topic.xxx Topics don't get removed when the originating tempQueue, Queue or Topic is removed so is somewhat a memory leak

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 5.4.2, 5.5.0
    • None
    • Broker
    • None

    Description

      Seems like support for removing some Advisories topics when their originating queue, topic, tempQueue or tempTopic is removed has not been provided.

      In RegionBroker.java :

      public void removeAdvisoryTopics(String destinationType, ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception {
      if (this.brokerService.isAdvisorySupport()) {
      String producerAdvisoryTopic = AdvisorySupport.PRODUCER_ADVISORY_TOPIC_PREFIX + destinationType + destination.getPhysicalName();
      String consumerAdvisoryTopic = AdvisorySupport.CONSUMER_ADVISORY_TOPIC_PREFIX + destinationType + destination.getPhysicalName();

      ActiveMQDestination dests[] = getDestinations();
      for (ActiveMQDestination dest: dests) {
      String name = dest.getPhysicalName();
      if ( name.equals(producerAdvisoryTopic) || name.equals(consumerAdvisoryTopic) ) {
      try

      { removeDestination(context, dest, timeout); }

      catch (JMSException ignore)

      { // at least ignore the Unknown Destination Type JMSException }

      }
      }
      }
      }

      Seem like PRODUCER_ADVISORY_TOPIC and CONSUMER_ADVISORY_TOPIC topics are the only advisories removed when originating destination is removed. Most advisories when enabled in the policy do not get removed.

      Attachments

        1. AdvisorySupport.java
          30 kB
          Marcel Casado
        2. AdvisoryTempDestinationTests.java
          14 kB
          Marcel Casado
        3. amq_no_queue_yet.tiff
          218 kB
          Marcel Casado
        4. amq_test_queue_advisories_created_after_sent_message_to_queue.tiff
          154 kB
          Marcel Casado
        5. amq_test_queue_created.tiff
          134 kB
          Marcel Casado
        6. amq_test_queue_removed_but_advisory_mesage_delivered_not.tiff
          141 kB
          Marcel Casado
        7. RegionBroker.java
          38 kB
          Marcel Casado

        Activity

          People

            Unassigned Unassigned
            marcelcasado Marcel Casado
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: