[ 
https://issues.apache.org/jira/browse/AMQ-3324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13123127#comment-13123127
 ] 

Arthur Naseef commented on AMQ-3324:
------------------------------------

I'm going to take a look at this one as we've been hit with a temporary 
destination leak that gets ugly when we setup a test environment to test 
failover periodically (spoke node failing between two nodes every 15 minutes).

If all goes well, I'll post the patch.
                
> 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
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-3324
>                 URL: https://issues.apache.org/jira/browse/AMQ-3324
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.2, 5.5.0
>            Reporter: Marcel Casado
>            Priority: Minor
>         Attachments: AdvisorySupport.java, AdvisoryTempDestinationTests.java, 
> RegionBroker.java, amq_no_queue_yet.tiff, 
> amq_test_queue_advisories_created_after_sent_message_to_queue.tiff, 
> amq_test_queue_created.tiff, 
> amq_test_queue_removed_but_advisory_mesage_delivered_not.tiff
>
>
> 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. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to