[
https://issues.apache.org/jira/browse/AMQ-3324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17388257#comment-17388257
]
Florian Kolbe commented on AMQ-3324:
------------------------------------
Looks we are also in trouble if we use JMX BrokerViewMBean.removeQueue(String)
and then the Advisory Destinations leaves us with thousands of Threads all of
the form:
{noformat}
"Topic
ActiveMQ.Advisory.Consumer.Queue.03a3514d-c225-49b3-88e3-c39bca91b6cd.input"
#342596 daemon prio=5 os_prio=0 tid=0x0000000800f33000 nid=0x2e384 in
Object.wait() [0x00000008b646f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Unknown Source)
at
org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:119)
- locked <0x00000000d8208348> (a java.lang.Object)
at
org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:42)
{noformat}
eventually draining the system handles (Windows).
I guess in this case we have two workarounds?
# explicitly removing the Advisory Queues along the actual queue?
# disabling advisory queues?
> 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 was sent by Atlassian Jira
(v8.3.4#803005)