History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: AMQ-1322
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Jonas Lim
Reporter: Manuel Teira
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ActiveMQ

AdvisoryBroker leaks destinations created "from top" by the RegionBroker

Created: 13/Jul/07 05:50 AM   Updated: 24/Jul/07 07:03 AM
Component/s: Broker
Affects Version/s: 4.1.1, 5.2.0
Fix Version/s: 4.1.2

Time Tracking:
Not Specified

File Attachments:
  Size
Text File AdvisoryBroker.patch 2007-07-13 05:50 AM Manuel Teira 4 kb
Environment: activemq svn branch 4.1

Patch Info: Patch Available


 Description  « Hide
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.


 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Jonas Lim - 24/Jul/07 05:32 AM
patch applied in 4.1 branch r559023