activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Geißelmeier (JIRA) <j...@apache.org>
Subject [jira] Commented: (AMQ-2742) Subscription on TempQueues in Network-Of-Brokers not deleted
Date Thu, 20 May 2010 07:25:29 GMT

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

Benjamin Geißelmeier commented on AMQ-2742:
-------------------------------------------

It almost works... I can see subscriptions comming and going, but after a while, the old behavior
is back.
Instead the following Exception appears periodically in the log of hostB:

{noformat}
WARN  [, Service] Async error occurred: java.lang.IllegalStateException: Cannot remove a produce
r that had not been registered: ID:hostB-65486-1274287604271-4:2:186:1
java.lang.IllegalStateException: Cannot remove a producer that had not been registered: ID:hostB-6548
6-1274287604271-4:2:186:1
     at org.apache.activemq.broker.TransportConnection.processRemoveProducer(TransportConnection.java:525)
     at org.apache.activemq.command.RemoveInfo.visit(RemoveInfo.java:78)
     at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:306)
     at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:182)
     at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:69)
     at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
     at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:217)
     at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
     at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:219)
     at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:201)
     at java.lang.Thread.run(Unknown Source)
{noformat}


> Subscription on TempQueues in Network-Of-Brokers not deleted
> ------------------------------------------------------------
>
>                 Key: AMQ-2742
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2742
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMX
>    Affects Versions: 5.3.0, 5.3.2
>         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:
> {noformat}
> <amq:broker xmlns="http://activemq.apache.org/schema/core" id="broker" persistent="false"
useJmx="true"
> 	brokerName="${hostname}:61619" useShutdownHook="false">
> 	
> 	<amq:destinationPolicy>
> 		<amq:policyMap>
> 			<amq:defaultEntry>
> 				<amq:policyEntry queue="${queue-name}">
> 					<amq:dispatchPolicy>
> 						<amq:roundRobinDispatchPolicy />
> 					</amq:dispatchPolicy>
> 				</amq:policyEntry>
> 			</amq:defaultEntry>
> 		</amq:policyMap>
> 	</amq:destinationPolicy> 
> 	<!-- Use the default JVM JMX connector -->
> 	<amq:managementContext>
> 		<amq:managementContext createConnector="false" />
> 	</amq:managementContext>
> 	<amq:networkConnectors>
> 	<!--  Cluster configuration: build a static network of brokers -->
> 	  <amq:networkConnector uri="static:(tcp://${HOSTNAME_OF_OTHER_INSTANCE}:61619)"
/>
> 	</amq:networkConnectors>
> 	<amq:transportConnectors>
> 	  <!-- "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://0.0.0.0:61619"
> 		discoveryUri="multicast://default?group=${activemq-group}" />
> 	</amq:transportConnectors>
> </amq:broker>
> {noformat}
> 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:
>  {code}
> 	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(...);
> 	initMessage.setJMSReplyTo(rxQueue);
> 	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:
> 	rxQueue.delete();
> 	// Host closes 2nd temp queue, too
> {code}
> 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.


Mime
View raw message