activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ashwini kuntamukkala (JIRA)" <>
Subject [jira] Updated: (AMQ-2918) ActiveMQMapMessage stay in memory causing leaks
Date Wed, 15 Sep 2010 14:11:40 GMT


ashwini kuntamukkala updated AMQ-2918:


This is a very simple test. I created a Map<String,String> with large 8KB persistent
I used ActiveMQ 5.4.0 broker. I use JMSTemplate to send messages to a queue. (I have used
VM/TCP transports). Important thing to note is that there is no consumer associated with the
queue. So, messages are flooding the queue at a fast rate. (only producer)
(This is like a DLQ where messages are flooding into because of consistent error by consumer
causing session rollback. Here no consumer dequeues messages from DLQ automatically. Its handled

The  following shows destination policy and system  memory configuration.

                <policyEntry topic=">" producerFlowControl="false" >
                    <vmCursor />
                <policyEntry queue=">" producerFlowControl="false">
			        	<individualDeadLetterStrategy queuePrefix="DLQ." useQueueForQueueMessages="true"
             		            <strictOrderDispatchPolicy />

            <systemUsage  sendFailIfNoSpace="true">
                    <memoryUsage limit="256 mb"/>
                    <storeUsage limit="1 gb"/>
                    <tempUsage limit="100 mb"/>

> ActiveMQMapMessage stay in memory causing leaks
> -----------------------------------------------
>                 Key: AMQ-2918
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.0
>         Environment: Windows XP
>            Reporter: ashwini kuntamukkala
> I am running embedded broker in a spring container. During a volume test, I forward messages
to a  dead letter queue. ActiveMQMapMessage that are being redirected to dead letter queue
stay in memory. So, if I forward 15000 messages to dead letter queue, all 15000 messages will
be in memory. These are persistent messages. 
> I want to have a smaller memory footprint. Why are the activemqmapmessages staying in
memory. the ones that were successfully processed get deleted just fine. 
> This is jmap -histo output
>   14:         19826        3647984  org.apache.activemq.command.ActiveMQMapMessage
>   28:         19791         791640  org.apache.activemq.command.ActiveMQQueue
> total of 19K+ activeMqMapMessages and  ActiveMQQueue instances...
> Since these are dead letter messages, why does ActiveMQ need to hold references to these
messages in memory??
> ----------------------------------
> I tried using the filequeuecursor: after a while the broker stopped responding because
of the following error. 
> 294 : Async
error occurred: java.lang.RuntimeException: java.lang.NullPointerException
> java.lang.RuntimeException: java.lang.NullPointerException
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at org.apache.activemq.command.ActiveMQMessage.visit(
> 	at
> 	at$1.onCommand(
> 	at org.apache.activemq.transport.ResponseCorrelator.onCommand(
> 	at org.apache.activemq.transport.TransportFilter.onCommand(
> 	at org.apache.activemq.transport.vm.VMTransport.iterate(
> 	at org.apache.activemq.thread.PooledTaskRunner.runTask(
> 	at org.apache.activemq.thread.PooledTaskRunner$
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> 	at java.util.concurrent.ThreadPoolExecutor$ Source)
> 	at Source)
> Caused by: java.lang.NullPointerException
> 	at
> 	at$2.execute(
> 	at
> 	at
> 	at
> 	... 24 more

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message