activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manuel Teira <>
Subject Advisory topic leakages (theory)
Date Fri, 06 Jul 2007 11:15:23 GMT
I have observed that the Consumer advisory topics (at least for 
temporary queues) are not disposed, at least in svn 4.1 branch. I think 
that this is caused by the way they are tried to be deleted from the 
AdvisoryBroker removeDestinationInfo method:

            try {
AdvisorySupport.getConsumerAdvisoryTopic(info.getDestination()), -1);
            } catch (Exception expectedIfDestinationDidNotExistYet) {
            try {
AdvisorySupport.getProducerAdvisoryTopic(info.getDestination()), -1);
            } catch (Exception expectedIfDestinationDidNotExistYet) {

But that helper method, 
AdvisorySupport.get[Consumer|Producer]AdvisoyTopic is always creating a 
new Topic:

    public static ActiveMQTopic 
getConsumerAdvisoryTopic(ActiveMQDestination destination) {
        if( destination.isQueue() )
            return new 
            return new 

So, what we are feeding to next.removeDestination, where next is 
eventually the RegionBroker chained instance, is a different 
ActiveMQTopic than the original one that we were trying to delete. As 
RegionBroker destinations is a ConcurrentHashMap, and the object we are 
passing to be removed is different from the original one,  is it going 
to remove anything?

The procedure followed in trunk seems to be the same.



View raw message