Hi Yuta,

Thank you for the report - could you please record this problem in JIRA
(http://issues.apache.org/jira/browse/qpid) to ensure it is investigated
and tracked correctly?

Thank you,
-Steve

--
Steve Huston, Riverace Corporation
Total Lifecycle Support for Your Networked Applications
http://www.riverace.com


> -----Original Message-----
> From: Yuta Kawadai [mailto:yuta...@gmail.com] 
> Sent: Monday, May 24, 2010 11:21 PM
> To: users@qpid.apache.org
> Subject: Is C++ broker memory leak?
> 
> 
> Hi,
> 
> The more I run Java test code which is simply declare/delete 
> queue and check the queue existence by queuequery(please see 
> below), the more
> C++ broker memory size increase(NEVER decrease).
> Every times, the test code is successful.
> 
> Here is run summary(the test code run 10 times.).
> 
>            |   broker memory size
> Run #  |   (MB)
> ----------|------------------------------
> initial   |    3
> #1       |   23
> #2       |   42
> #3       |   50
> #4       |   52
> #5       |   65
> #6       |   64
> #7       |   72
> #8       |   77
> #9       |   81
> #10     |   88
> 
> 
> My question is,
> Although the queue had been deleted, why broker memory didn't 
> decrease? Is broker memory leak? Or Is there mistake about 
> how to use Java client API?
> 
> Regards,
> Yuta
> 
> 
> Details:
> qpid 0.6
> C++ Broker(windows, x64)(downloaded from
> http://www.riverace.com/qpid/downloads.htm)
> Java client
> OS:Win XP x64 SP2
> CPU:Core2 Duo E6750
> Mem:8GB
> JRE:Sun1.6.0_12(x64)
> 
> 
> --------------------------test code 
> start----------------------------------
> import static org.testng.Assert.*;
> 
> import java.util.UUID;
> 
> import org.apache.qpid.transport.Connection;
> import org.apache.qpid.transport.Future;
> import org.apache.qpid.transport.Option;
> import org.apache.qpid.transport.QueueQueryResult;
> import org.apache.qpid.transport.Session;
> import org.testng.annotations.Test;
> 
> public class QPIDSpecTest
> {
>     private final String HOST_NAME = "localhost";
>     private final int PORT_NO = 5672;
>     private final String VIRTUAL_HOST = "test";
>     private final String USER_NAME = "qpid";
>     private final String PASSWORD = "qpid";
> 
>     @Test
>     public void testDeclareQueue()
>     {
>         Connection connection = new Connection();
>         connection.connect(HOST_NAME, PORT_NO, VIRTUAL_HOST, 
> USER_NAME, PASSWORD);
>         Session session = connection.createSession();
> 
>         final int REPEAT_NUM = 10000;
>         for(int i = 0; i < REPEAT_NUM; i++)
>         {
>             UUID uuid = UUID.randomUUID();
>             String name = uuid.toString();
>             session.queueDeclare(name, null, null, 
> Option.EXCLUSIVE, Option.AUTO_DELETE);
>             session.sync();
> 
>             Future<QueueQueryResult> resultFuture = 
> session.queueQuery(name);
>             QueueQueryResult result = resultFuture.get();
>             assertTrue(result.hasQueue());
> 
>             session.queueDelete(name);
>             session.sync();
> 
>             Future<QueueQueryResult> resultAfterFuture = 
> session.queueQuery(name);
>             QueueQueryResult resultAfter = resultAfterFuture.get();
>             assertFalse(resultAfter.hasQueue());
>         }
> 
>         session.close();
>         connection.close();
>     }
> }
> 
> --------------------------test code 
> end----------------------------------
> 
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscr...@qpid.apache.org
> 
> 


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscr...@qpid.apache.org

Reply via email to