activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <j...@apache.org>
Subject [jira] Created: (AMQ-2064) memoryUsage and storeUsage of systemUsage in activemq.xml are not associated with a persistence adapter
Date Tue, 13 Jan 2009 15:23:59 GMT
memoryUsage and storeUsage of systemUsage in activemq.xml are not associated with a persistence
adapter 
--------------------------------------------------------------------------------------------------------

                 Key: AMQ-2064
                 URL: https://issues.apache.org/activemq/browse/AMQ-2064
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.2.0
         Environment: all
            Reporter: Gary Tully
            Assignee: Gary Tully
             Fix For: 5.3.0


{code}
        <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage limit="20 mb"/>
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="1 gb" name="foo"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="100 mb"/>
                </tempUsage>
            </systemUsage>
        </systemUsage>
{code}
Memory usage works, but both the store and temp usage are not associated with a persistence
adapter so they don't take effect.
The workaround is to configure a persistence adapter bean and ref it:
{code}
 <bean id="store" class="org.apache.activemq.store.amq.AMQPersistenceAdapter" >
     <property name="directory" value="target/amqdata" />
     <property name="maxFileLength" value="1000000" />
     <property name="checkpointInterval" value="5000" />
     <property name="cleanupInterval" value="5000" />
   </bean>
 
   <broker xmlns="http://activemq.apache.org/schema/core"
     persistent="true"
     advisorySupport="false"
     dataDirectory="target/amqdata"
     deleteAllMessagesOnStartup="true"
     useJmx="true"
     brokerName="localhost"
     monitorConnectionSplits="false"
     splitSystemUsageForProducersConsumers="false"
     start="false"
     persistenceAdapter="#store">
  
     <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
     <managementContext>
       <managementContext createConnector="false"/>
     </managementContext>

     <!--  The maximum about of space the broker will use before slowing down producers
-->
     <systemUsage>
       <systemUsage sendFailIfNoSpace="true" >
         <memoryUsage>
           <memoryUsage limit="400kb" />
         </memoryUsage>
         <storeUsage>
           <storeUsage limit="10mb" store="#store" />
         </storeUsage>       
         <tempUsage>
           <tempUsage limit="64mb" />
         </tempUsage>
       </systemUsage>
     </systemUsage>
{code}
from: http://open-source-adventures.blogspot.com/2009/01/limiting-disk-store-usage-with-active.html



It should  be possible to ensure that a store or temp usage not associated with a store is
associated with the broker persistence adapter in XBrokerService afterPropertiesSet.

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


Mime
View raw message