activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Bertram <>
Subject Re: Artemis 1.2 - possible mem leak in Management API (via JMS)
Date Mon, 09 May 2016 18:51:49 GMT
Can you provide a test-case which generates an OOME after numerous calls like this.  I've tried
and I can't.


----- Original Message -----
From: "Andrew Loucas" <>
Sent: Thursday, May 5, 2016 4:02:43 AM
Subject: Artemis 1.2 - possible mem leak in Management API (via JMS)

Hi,I'm using Artemis 1.2.0 with an embedded broker and I'm following the documented code under
"Using Management Via JMS" so I have this to get the message count:
        try (            QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
       ) {            Queue managementQueue = ActiveMQJMSClient.createQueue("");
           QueueRequestor requestor = new QueueRequestor(session, managementQueue);      
     Message message = session.createTextMessage();            JMSManagementHelper.putAttribute(message,
"jms.queue.exampleQueue", "messageCount");            Message reply = requestor.request(message);
           requestor.close();            return (int) (Integer) JMSManagementHelper.getResult(reply);
       } catch (Exception e) {            throw propagate(e);        }
After introducing this code I would eventually get an OOM in my app, profiling revealed certain
instances were going up each time it was called and never went down after GC, e.g.:
I do not see this behaviour with other code reading and writing to queues in my app. Let me
know if you need more details to investigate.

View raw message