You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Denis Abramov (JIRA)" <ji...@apache.org> on 2007/05/30 21:14:32 UTC

[jira] Created: (AMQ-1255) Advisory queues don't disappear for TEMPORARY queues/topics

Advisory queues don't disappear for TEMPORARY queues/topics
-----------------------------------------------------------

                 Key: AMQ-1255
                 URL: https://issues.apache.org/activemq/browse/AMQ-1255
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 4.1.0
            Reporter: Denis Abramov


My ActiveMQ clients create TEMPORARY queues and I have been looking through the active queues recently and I noticed a number of advisory queues are sticking around (mostly ones that have ActiveMQ.Advisory.Producer.*) that refer to the temporary queues that I created. It seems that even though the temporary queues are gone the advisory topics are still there. Over time this looks like it degrades the performance of ActiveMQ.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (AMQ-1255) Advisory queues don't disappear for TEMPORARY queues/topics

Posted by "Rob Davies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Davies reopened AMQ-1255:
-----------------------------


my mistake - problem is there

> Advisory queues don't disappear for TEMPORARY queues/topics
> -----------------------------------------------------------
>
>                 Key: AMQ-1255
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1255
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 4.1.0
>            Reporter: Denis Abramov
>            Assignee: Rob Davies
>             Fix For: 5.1.0
>
>
> My ActiveMQ clients create TEMPORARY queues and I have been looking through the active queues recently and I noticed a number of advisory queues are sticking around (mostly ones that have ActiveMQ.Advisory.Producer.*) that refer to the temporary queues that I created. It seems that even though the temporary queues are gone the advisory topics are still there. Over time this looks like it degrades the performance of ActiveMQ.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-1255) Advisory queues don't disappear for TEMPORARY queues/topics

Posted by "Rob Davies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40266 ] 

Rob Davies commented on AMQ-1255:
---------------------------------

Denis - is this still a problem on the latest?

> Advisory queues don't disappear for TEMPORARY queues/topics
> -----------------------------------------------------------
>
>                 Key: AMQ-1255
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1255
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 4.1.0
>            Reporter: Denis Abramov
>            Assignee: Rob Davies
>             Fix For: 5.2.0
>
>
> My ActiveMQ clients create TEMPORARY queues and I have been looking through the active queues recently and I noticed a number of advisory queues are sticking around (mostly ones that have ActiveMQ.Advisory.Producer.*) that refer to the temporary queues that I created. It seems that even though the temporary queues are gone the advisory topics are still there. Over time this looks like it degrades the performance of ActiveMQ.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-1255) Advisory queues don't disappear for TEMPORARY queues/topics

Posted by "Denis Abramov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41401#action_41401 ] 

Denis Abramov commented on AMQ-1255:
------------------------------------

Tried 5.1 snapshot and still seems like it is happening.

> Advisory queues don't disappear for TEMPORARY queues/topics
> -----------------------------------------------------------
>
>                 Key: AMQ-1255
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1255
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 4.1.0
>            Reporter: Denis Abramov
>            Assignee: Rob Davies
>             Fix For: 5.2.0
>
>
> My ActiveMQ clients create TEMPORARY queues and I have been looking through the active queues recently and I noticed a number of advisory queues are sticking around (mostly ones that have ActiveMQ.Advisory.Producer.*) that refer to the temporary queues that I created. It seems that even though the temporary queues are gone the advisory topics are still there. Over time this looks like it degrades the performance of ActiveMQ.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-1255) Advisory queues don't disappear for TEMPORARY queues/topics

Posted by "Matthew Roy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41481#action_41481 ] 

Matthew Roy commented on AMQ-1255:
----------------------------------

I am having similar problems with Advisory queues not disappearing after a topic is destroyed, and have found one code path that leaks advisory topics in my application.  If I create a topic, add a consumer for said topic, send some messages, remove the consumer, and explicitly destroy the topic, there are times that advisory topics for the topic are left behind.  The path that lead to this situation in my app was in AdvisoryBroker.addConsumer.  When I create the topic in the client, no addDestination occurs on the server, but when I add the consumer, the addConsumer occurs.  The AdvisoryBroker's addConsumer method does:
ActiveMQTopic topic = AdvisorySupport.getConsumerAdvisoryTopic(info.getDestination());
consumers.put(info.getConsumerId(), info);
fireConsumerAdvisory(context, topic, info);

Which in turn causes an addDestination to occur within the RegionBroker when the advisory event is sent to the ConsumerAdvisoryTopic created above.  What seems to be missing is when the removeDestination  method occurs, it looks within the AdvisoryBroker's destinations map for an entry for the destination getting closed, but in my situation there is no entry for my topic since addDestination never occured within the AdvisoryBroker.  This leaves behind the ConsumerAdvisoryTopic for my topic within the RegionBroker.

I'm not at all familiar with the inner workings of the Advisory system, but for my system I was able to greatly reduce the leaks by changing the addConsumer to look like this:

ActiveMQTopic topic = AdvisorySupport.getConsumerAdvisoryTopic(info.getDestination());
consumers.put(info.getConsumerId(), info);
if(!destinations.containsKey(info.getDestination())) {
  DestinationInfo destInfo = new DestinationInfo(context.getConnectionId(), DestinationInfo.ADD_OPERATION_TYPE, topic);
  fireAdvisory(context, topic, destInfo);
  destinations.put(info.getDestination(), destInfo);
}
 fireConsumerAdvisory(context, topic, info);

By doing this, when a destination is destroyed, the AdvisoryBroker has an entry in the map for the destination, so is able to remove the advisory topics from the RegionBroker.  I also did something similar in the addProducer.

As I said, this was simply a blind attempt to solve the leak within my application without any knowledge of the Advisory system, so I have no idea if this will cause side effects or unwanted behavior, but it might point someone with more understanding to the source of the problem.


> Advisory queues don't disappear for TEMPORARY queues/topics
> -----------------------------------------------------------
>
>                 Key: AMQ-1255
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1255
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 4.1.0
>            Reporter: Denis Abramov
>            Assignee: Rob Davies
>             Fix For: 5.2.0
>
>
> My ActiveMQ clients create TEMPORARY queues and I have been looking through the active queues recently and I noticed a number of advisory queues are sticking around (mostly ones that have ActiveMQ.Advisory.Producer.*) that refer to the temporary queues that I created. It seems that even though the temporary queues are gone the advisory topics are still there. Over time this looks like it degrades the performance of ActiveMQ.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (AMQ-1255) Advisory queues don't disappear for TEMPORARY queues/topics

Posted by "Rob Davies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Davies reassigned AMQ-1255:
-------------------------------

    Assignee: Rob Davies

> Advisory queues don't disappear for TEMPORARY queues/topics
> -----------------------------------------------------------
>
>                 Key: AMQ-1255
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1255
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 4.1.0
>            Reporter: Denis Abramov
>            Assignee: Rob Davies
>
> My ActiveMQ clients create TEMPORARY queues and I have been looking through the active queues recently and I noticed a number of advisory queues are sticking around (mostly ones that have ActiveMQ.Advisory.Producer.*) that refer to the temporary queues that I created. It seems that even though the temporary queues are gone the advisory topics are still there. Over time this looks like it degrades the performance of ActiveMQ.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQ-1255) Advisory queues don't disappear for TEMPORARY queues/topics

Posted by "Rob Davies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Davies resolved AMQ-1255.
-----------------------------

    Fix Version/s: 5.1.0
                       (was: 5.2.0)
       Resolution: Fixed

Cannot reproduce this on snapshot for 5.1

> Advisory queues don't disappear for TEMPORARY queues/topics
> -----------------------------------------------------------
>
>                 Key: AMQ-1255
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1255
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 4.1.0
>            Reporter: Denis Abramov
>            Assignee: Rob Davies
>             Fix For: 5.1.0
>
>
> My ActiveMQ clients create TEMPORARY queues and I have been looking through the active queues recently and I noticed a number of advisory queues are sticking around (mostly ones that have ActiveMQ.Advisory.Producer.*) that refer to the temporary queues that I created. It seems that even though the temporary queues are gone the advisory topics are still there. Over time this looks like it degrades the performance of ActiveMQ.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQ-1255) Advisory queues don't disappear for TEMPORARY queues/topics

Posted by "Rob Davies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Davies resolved AMQ-1255.
-----------------------------

    Resolution: Fixed

Resolved by SVN revision 647872

> Advisory queues don't disappear for TEMPORARY queues/topics
> -----------------------------------------------------------
>
>                 Key: AMQ-1255
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1255
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 4.1.0
>            Reporter: Denis Abramov
>            Assignee: Rob Davies
>             Fix For: 5.1.0
>
>
> My ActiveMQ clients create TEMPORARY queues and I have been looking through the active queues recently and I noticed a number of advisory queues are sticking around (mostly ones that have ActiveMQ.Advisory.Producer.*) that refer to the temporary queues that I created. It seems that even though the temporary queues are gone the advisory topics are still there. Over time this looks like it degrades the performance of ActiveMQ.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.