activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Gei├čelmeier (JIRA) <>
Subject [jira] Created: (AMQ-2742) Subscription on TempQueues in Network-Of-Brokers not deleted
Date Wed, 19 May 2010 15:05:12 GMT
Subscription on TempQueues in Network-Of-Brokers not deleted

                 Key: AMQ-2742
             Project: ActiveMQ
          Issue Type: Bug
          Components: JMX
    Affects Versions: 5.3.2, 5.3.0
         Environment: seen on Win XP, Win 7, Server 2003 and 2008
            Reporter: Benjamin Gei├čelmeier

I have the following situation:
A static network of brokers, working on hostA:61619 and hostB:61619, both with JMX enabled
as shown in this Spring configuration:

<amq:broker xmlns="" id="broker" persistent="false"
	brokerName="${hostname}:61619" useShutdownHook="false">
				<amq:policyEntry queue="${queue-name}">
						<amq:roundRobinDispatchPolicy />

	<!-- Use the default JVM JMX connector -->
		<amq:managementContext createConnector="false" />

	<!--  Cluster configuration: build a static network of brokers -->
	  <amq:networkConnector uri="static:(tcp://${HOSTNAME_OF_OTHER_INSTANCE}:61619)" />

	  <!-- "listen" on the in-VM transport -->
	  <amq:transportConnector uri="vm://my-server" />
	  <!-- listen on a statically chosen tcp port which is announced for discovery -->
	  <amq:transportConnector uri="tcp://"
		discoveryUri="multicast://default?group=${activemq-group}" />

My application looks like this:

 # Both host instances are connected via VM transport to the broker and wait for new messages
in $queue-name
 # Clients send messages to this shared queue with a TempQueue to which the hosts shall reply:
	QueueConnectionFactory factory = new ActiveMQConnectionFactory("failover:(...)");
	QueueConnection connection = factory.createQueueConnection();
    Queue session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
    final QueueSender producer = session.createSender(session.createQueue($queue-name));
	TemporaryQueue rxQueue = session.createTemporaryQueue();
	ObjectMessage initMessage = session.createObjectMessage(...);
	producer.send(initMessage, DeliveryMode.NON_PERSISTENT, Message.DEFAULT_PRIORITY, 100000);
	// When the host takes this initMessage from the queue, it creates a 2nd temp queue for further
client messages
	// Do some work...
	// Close everything: connection, session, producer and in particular:
	// Host closes 2nd temp queue, too

Say a client connects to hostA (e.g. via tcp://hostA:616169) and hostA takes the client request
from the queue. Now I can see a non-durable subscription for the temporary queue the client
has created in the JMX consoles of both host instances. But after the temp queue was deleted
the subscription still exists on hostB.
After several requests there are a lot of subscriptions for deleted queues in the JMX console
which looks like a potential memory leak. (-> screenshot)
I've seen this effect in ActiveMQ version 5.3.0 and 5.3.2

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

View raw message