You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by kureckam <mk...@fractech.net> on 2012/07/19 22:42:52 UTC

Memory question

I'm using 5.5.1 and have several non-durable topics. A snippet of my config
file is below. I have a few questions:

1) Is the limit for each topic is 100kb?
2) If I don't set a memory limit in the policy entry, does it use the
systemUsage, memoryUsage value of 1mb?
3) If the memory limit is reached does it just block the producer or does it
save it to disk until the disk is full as defined by storeUsage or is that
just for durable topics/Queues?

      <destinationPolicy>
         <policyMap>
            <policyEntries>
               <policyEntry topic=">" producerFlowControl="true"
memoryLimit="100 kb" />
            </policyEntries>
         </policyMap>
      </destinationPolicy>
        
      <persistenceAdapter>
         <kahaDB directory="${activemq.base}/data/mqData"
                 journalMaxFileLength="3 mb" />
      </persistenceAdapter>
        
      <systemUsage>
         <systemUsage sendFailIfNoSpace="true">
            <memoryUsage>
               <memoryUsage limit="1 mb"/>
            </memoryUsage>
            <storeUsage>
               <storeUsage limit="500 mb" />
            </storeUsage>
            <tempUsage>
               <tempUsage limit="50 mb"/>
            </tempUsage>
         </systemUsage>
      </systemUsage>




--
View this message in context: http://activemq.2283324.n4.nabble.com/Memory-question-tp4654184.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Memory question

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi


> 1) Is the limit for each topic is 100kb?

If this limit is reached the producer will be blocked

> 2) If I don't set a memory limit in the policy entry, does it use the
> systemUsage, memoryUsage value of 1mb?

If the memory limit is not set (or reached) the message will be sent
to the consumer subscription (in the broker). If message can be
dispatched, it will be immediately, if not it will be tried to be put
in a message cursor (http://activemq.apache.org/message-cursors.html).
By default file message cursor is used for topics, so systemUsage will
be checked. But be aware that system usage is shared among all
destinations. This means that if overall memory is full, the message
will be spooled on disk until you get out of disk space.

> 3) If the memory limit is reached does it just block the producer or does it
> save it to disk until the disk is full as defined by storeUsage or is that
> just for durable topics/Queues?

See above.