activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AMQ-1979) Temporary queue on slave not removed in Pure Master/Slave setup
Date Wed, 15 Oct 2008 14:21:52 GMT

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

Gary Tully commented on AMQ-1979:
---------------------------------

not sure about the validity of the test case here. I tried to reproduce using an existing
test case and I get an exception because the temp destination is in use till the consumer
is closed. so it is not possible to delete before the close; can you concur.
I see an exception in your test case also. In the exception case, the temp destination is
not deleted at all!

see the simple code mod to TempQueueMemoryTest:
{code}
Index: activemq-core/src/test/java/org/apache/activemq/advisory/TempQueueMemoryTest.java
===================================================================
--- activemq-core/src/test/java/org/apache/activemq/advisory/TempQueueMemoryTest.java	(revision
704890)
+++ activemq-core/src/test/java/org/apache/activemq/advisory/TempQueueMemoryTest.java	(working
copy)
@@ -37,7 +37,7 @@
     protected Connection clientConnection;
     protected Session clientSession;
     protected Destination serverDestination;
-    protected static final int COUNT = 2000;
+    protected static final int COUNT = 1; // 2000
 
     public void testLoadRequestReply() throws Exception {
         MessageConsumer serverConsumer = serverSession.createConsumer(serverDestination);
@@ -63,8 +63,9 @@
             msg.setJMSReplyTo(replyTo);
             producer.send(msg);
             Message reply = consumer.receive();
+            //consumer.close();
+            replyTo.delete();
             consumer.close();
-            replyTo.delete();
         }
         
         clientSession.close();
{code}

> Temporary queue on slave not removed in Pure Master/Slave setup
> ---------------------------------------------------------------
>
>                 Key: AMQ-1979
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1979
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>            Reporter: Hans Bausewein
>            Assignee: Gary Tully
>         Attachments: activemqjee-0.0.6-src.tar.gz
>
>
> Maybe not the most logical client code, but it happened here and I guess it will happen
somewhere again:
>   TemporaryQueue reply = session.createTemporaryQueue();      	
>   MessageConsumer consumer = session.createConsumer(reply);
>   Message received = consumer.receive(timeout);
>   ...
>   reply.delete();
>   consumer.close();
> I've removed try/finally blocks to keep it simple.
> See the attached source code.
> It works fine, but set 
>   JmsMessageHandler.REVERSE_ORDER=true
> and the slave will not be cleaned up properly.
> It means that the number of threads is increasing and at some time it will get an OutOfMemoryError
(see AMQ-1849) and the slave dies.

-- 
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