activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lurga <...@netease.com>
Subject memoryUsage configuration
Date Mon, 10 Nov 2008 08:30:16 GMT

I have a question about activemq: 
I tried setting the destination limit low and the system limit high, with
the following config 
       <destinationPolicy>
            <policyMap>
                <policyEntries>
                    <policyEntry queue=">" memoryLimit="1kb"/>
                    <policyEntry topic=">" memoryLimit="1kb">
                    </policyEntry>
                </policyEntries>
            </policyMap>
        </destinationPolicy>
        <persistenceAdapter>
            <jdbcPersistenceAdapter dataSource="#derby-ds"/>
        </persistenceAdapter>
        <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage limit="10kb"/>
                </memoryUsage>
            </systemUsage>
        </systemUsage>
When I'm trying to send 10 non-persistent messages with 1k for each message
to a queue named "TEST.FOO", my producer blocks after sending 2 messages. 
If I set the system limit equal to destination limit, my producer won't
block and send 10 messages. 

I was browsing the source code, it seems BaseDestination uses two
memoryUsage. When BaseDestination.memoryUsage reaches its limit, the queue
does not send an ack back to producer and producer blocks. When
BaseDestination.systemUsage.memoryUsage reaches its limit, FilePendingCursor
would flush the messages to disk and reduce memory usage. Is it right?
-- 
View this message in context: http://www.nabble.com/memoryUsage-configuration-tp20416088p20416088.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message