activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From coryplusplus <>
Subject Remove Unacknowledged Heartbeat Message
Date Fri, 03 Oct 2014 16:08:03 GMT
Currently I am using apache-activemq-5.5.1 and am having some trouble with
memory usage filling up for a particular topic.

2014-08-12 22:33:44,881 | INFO  | Usage Manager memory limit reached.
Stopping producer (XXXXX) to prevent flooding topic://SERVER_PONG. See for more info
(blocking for: 1s) | | ActiveMQ
Transport: tcp:///

This blocking continues until activeMQ is restarted.

We basically have a client/server application where activemq is hosted on
the same machine as the server.
The server has multiple components and each produce a SERVER_PONG message
which is sent in response to a SERVER_PING message from the client. Our
current theory is that somehow our client is getting into an unexpected
state where it is able to send SERVER_PING messages but unable to consume
SERVER_PONG messages. This results in the SERVER_PONG messages backing up
and eventually causing us to exhaust our memory resources as mentioned

Our first attempt at a solution was to utilize the timeToLive variable and
set it for each SERVER_PONG message that was sent. That would have made sure
that we weren’t keeping SERVER_PONG messages around that were not
acknowledged and would stop us from flooding the broker. This however was
not a possibility as our clients can potentially be based in different time
zones than our server. I saw a lot of posts recommending the timestamp
plugin but that does not work in our case since our producer and broker are
on the same server and our consumer is the one checking the expiration time
before processing. (see

So the question now has become, is there a way to remove these server pong
messages that have not been acknowledged after x amount of time. Does
ActiveMQ provide an API that will allow us to check number of inFlight
messages per topic and remove them accordingly if we have too many?

Here is our activemq.xml configuration file if needed.


        <property name="locations">

    <broker xmlns=""
brokerName="localhost" dataDirectory="${activemq.base}/data"
persistent="false" >


<constantPendingMessageLimitStrategy limit="50" />
<constantPendingMessageLimitStrategy limit="5000" />
topic=">" producerFlowControl="false" memoryLimit="1 kb">
<vmCursor />
queue=">" producerFlowControl="false" memoryLimit="1 kb">

            <managementContext createConnector="true"/>


                    <memoryUsage limit="3072 mb"/>
                    <storeUsage limit="5 gb"/>
                    <tempUsage limit="8 gb"/>

                        <transportConnector name="openwire"




View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message