git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@961752 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2010-07-08 13:08:23 +00:00
parent aac39acbb2
commit 7a7a876045
1 changed files with 47 additions and 43 deletions

View File

@ -27,22 +27,40 @@
<!-- Allows us to use system properties as variables in this configuration file --> <!-- Allows us to use system properties as variables in this configuration file -->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/> <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="${name}" dataDirectory="${karaf.base}/data/activemq/${name}" useShutdownHook="false"> <broker xmlns="http://activemq.apache.org/schema/core" brokerName="${name}" dataDirectory="${karaf.data}/activemq/${name}" useShutdownHook="false">
<!--
For better performances use VM cursor and small memory limit.
For more information, see:
http://activemq.apache.org/message-cursors.html
Also, if your producer is "hanging", it's probably due to producer flow control.
For more information, see:
http://activemq.apache.org/producer-flow-control.html
-->
<!-- Destination specific policies using destination names or wildcards -->
<destinationPolicy> <destinationPolicy>
<policyMap> <policyMap>
<policyEntries> <policyEntries>
<policyEntry queue=">" memoryLimit="5mb"/> <policyEntry topic=">" producerFlowControl="true" memoryLimit="1mb">
<policyEntry topic=">" memoryLimit="5mb"> <pendingSubscriberPolicy>
<subscriptionRecoveryPolicy> <vmCursor />
<lastImageSubscriptionRecoveryPolicy/> </pendingSubscriberPolicy>
</subscriptionRecoveryPolicy> </policyEntry>
<policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
<!-- Use VM cursor for better latency
For more information, see:
http://activemq.apache.org/message-cursors.html
<pendingQueuePolicy>
<vmQueueCursor/>
</pendingQueuePolicy>
-->
</policyEntry> </policyEntry>
</policyEntries> </policyEntries>
</policyMap> </policyMap>
</destinationPolicy> </destinationPolicy>
<!-- Use the following to configure how ActiveMQ is exposed in JMX --> <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
@ -50,41 +68,28 @@
<managementContext createConnector="false"/> <managementContext createConnector="false"/>
</managementContext> </managementContext>
<!-- The store and forward broker networks ActiveMQ will listen to -->
<networkConnectors>
<!-- by default just auto discover the other brokers -->
<networkConnector name="default-nc" uri="multicast://default"/>
<!-- Example of a static configuration:
<networkConnector name="host1 and host2" uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
-->
</networkConnectors>
<persistenceAdapter>
<amqPersistenceAdapter syncOnWrite="false" directory="${karaf.base}/data/activemq/${name}" maxFileLength="20 mb"/>
</persistenceAdapter>
<!-- Use the following if you wish to configure the journal with JDBC -->
<!-- <!--
<persistenceAdapter> Configure message persistence for the broker. The default persistence
<journaledJDBC dataDirectory="${activemq.base}/data" dataSource="#postgres-ds"/> mechanism is the KahaDB store (identified by the kahaDB tag).
</persistenceAdapter> For more information, see:
-->
http://activemq.apache.org/persistence.html
-->
<persistenceAdapter>
<kahaDB directory="${karaf.data}/activemq/${name}/kahadb"/>
</persistenceAdapter>
<!-- Or if you want to use pure JDBC without a journal -->
<!-- <!--
<persistenceAdapter> The systemUsage controls the maximum amount of space the broker will
<jdbcPersistenceAdapter dataSource="#postgres-ds"/> use before slowing down producers. For more information, see:
</persistenceAdapter>
--> http://activemq.apache.org/producer-flow-control.html
<!-- The maximum about of space the broker will use before slowing down producers -->
<systemUsage> <systemUsage>
<systemUsage> <systemUsage>
<memoryUsage> <memoryUsage>
<memoryUsage limit="20 mb"/> <memoryUsage limit="20 mb"/>
</memoryUsage> </memoryUsage>
<storeUsage> <storeUsage>
<storeUsage limit="1 gb" name="foo"/> <storeUsage limit="1 gb" name="foo"/>
</storeUsage> </storeUsage>
@ -93,10 +98,11 @@
</tempUsage> </tempUsage>
</systemUsage> </systemUsage>
</systemUsage> </systemUsage>
-->
<!-- The transport connectors ActiveMQ will listen to --> <!-- The transport connectors ActiveMQ will listen to -->
<transportConnectors> <transportConnectors>
<transportConnector name="openwire" uri="tcp://localhost:61616" discoveryUri="multicast://default"/> <transportConnector name="openwire" uri="tcp://localhost:61616"/>
<transportConnector name="stomp" uri="stomp://localhost:61613"/> <transportConnector name="stomp" uri="stomp://localhost:61613"/>
</transportConnectors> </transportConnectors>
@ -107,11 +113,9 @@
<property name="brokerURL" value="tcp://localhost:61616" /> <property name="brokerURL" value="tcp://localhost:61616" />
</bean> </bean>
<bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactoryBean"> <bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory">
<property name="maxConnections" value="8" /> <property name="maxConnections" value="8" />
<property name="transactionManager" ref="transactionManager" />
<property name="connectionFactory" ref="activemqConnectionFactory" /> <property name="connectionFactory" ref="activemqConnectionFactory" />
<property name="resourceName" value="activemq.${name}" />
</bean> </bean>
<bean id="resourceManager" class="org.apache.activemq.pool.ActiveMQResourceManager" init-method="recoverResource"> <bean id="resourceManager" class="org.apache.activemq.pool.ActiveMQResourceManager" init-method="recoverResource">