[
https://issues.apache.org/activemq/browse/AMQ-2064?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary Tully resolved AMQ-2064.
-----------------------------
Resolution: Fixed
updated XBeanBrokerService to ensure store and temp usage have the persistence
adapter and temp store from the broker in afterPropertiesSet, before the broker
is optionally started.
The simple config in activemq.xml now takes effect as it now always has a
reference to the brokers resources.
> 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.