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

AdvisoryBroker leaks destinations created "from top" by the RegionBroker



    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.1.1, 5.2.0
    • 4.1.2
    • Broker
    • None
    • activemq svn branch 4.1

    • Patch Available


      Consider the following situation:

      • The AdvisoryBroker sends a message to a non existent yet advisory topic. (a producer advisory, for example).
      • The RegionBroker sends the request to the TopicRegion.
      • The TopicRegion automatically creates the new topic, sending:
        context.getBroker().addDestination(context, destination);
      • This eventually reaches again the AdvisoryBroker that adds the destination to its destination map.

      Now, when the queue that triggered the creation of the advisory topic is deleted, the AdvisoryBroker attempts to delete the consumer and producer related topics, but doesn't clear them from its own destination map.

      I'm attaching a proposed fix for the 4.1 branch, where:

      • The AdvisoryBroker tries to delete those producer and consumer advisories from top of the broker.
      • This is only made if the incoming destination is not a temporary itself, to avoid improper attempts to delete advisories of advisories.

      In the trunk , the situation is different.

      • The TopicRegion (actually in AbstracRegion code) creates the 'on demand' topics internally, without advising the RegionBroker.
      • So, since the RegionBroker is not aware of these newly created topics, AdvisoryBroker attempts to delete the producer and consumer advisory topics are futile.




            jlim Jonas B. Lim
            mteira Manuel Teira Paz
            0 Vote for this issue
            0 Start watching this issue