mirror of https://github.com/apache/activemq.git
https://issues.apache.org/activemq/browse/AMQ-2815 - updating default broker config
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@961752 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aac39acbb2
commit
7a7a876045
|
@ -27,64 +27,69 @@
|
||||||
<!-- 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">
|
||||||
|
|
||||||
<!-- Destination specific policies using destination names or wildcards -->
|
<!--
|
||||||
|
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
|
||||||
|
-->
|
||||||
|
|
||||||
<destinationPolicy>
|
<destinationPolicy>
|
||||||
<policyMap>
|
<policyMap>
|
||||||
|
<policyEntries>
|
||||||
<policyEntries>
|
<policyEntry topic=">" producerFlowControl="true" memoryLimit="1mb">
|
||||||
<policyEntry queue=">" memoryLimit="5mb"/>
|
<pendingSubscriberPolicy>
|
||||||
<policyEntry topic=">" memoryLimit="5mb">
|
<vmCursor />
|
||||||
<subscriptionRecoveryPolicy>
|
</pendingSubscriberPolicy>
|
||||||
<lastImageSubscriptionRecoveryPolicy/>
|
</policyEntry>
|
||||||
</subscriptionRecoveryPolicy>
|
<policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
|
||||||
</policyEntry>
|
<!-- Use VM cursor for better latency
|
||||||
</policyEntries>
|
For more information, see:
|
||||||
|
|
||||||
|
http://activemq.apache.org/message-cursors.html
|
||||||
|
|
||||||
|
<pendingQueuePolicy>
|
||||||
|
<vmQueueCursor/>
|
||||||
|
</pendingQueuePolicy>
|
||||||
|
-->
|
||||||
|
</policyEntry>
|
||||||
|
</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 -->
|
||||||
<managementContext>
|
<managementContext>
|
||||||
<managementContext createConnector="false"/>
|
<managementContext createConnector="false"/>
|
||||||
</managementContext>
|
</managementContext>
|
||||||
|
|
||||||
<!-- The store and forward broker networks ActiveMQ will listen to -->
|
<!--
|
||||||
<networkConnectors>
|
Configure message persistence for the broker. The default persistence
|
||||||
<!-- by default just auto discover the other brokers -->
|
mechanism is the KahaDB store (identified by the kahaDB tag).
|
||||||
|
For more information, see:
|
||||||
<networkConnector name="default-nc" uri="multicast://default"/>
|
|
||||||
<!-- Example of a static configuration:
|
http://activemq.apache.org/persistence.html
|
||||||
<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>
|
|
||||||
<journaledJDBC dataDirectory="${activemq.base}/data" dataSource="#postgres-ds"/>
|
|
||||||
</persistenceAdapter>
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Or if you want to use pure JDBC without a journal -->
|
|
||||||
<!--
|
|
||||||
<persistenceAdapter>
|
<persistenceAdapter>
|
||||||
<jdbcPersistenceAdapter dataSource="#postgres-ds"/>
|
<kahaDB directory="${karaf.data}/activemq/${name}/kahadb"/>
|
||||||
</persistenceAdapter>
|
</persistenceAdapter>
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- The maximum about of space the broker will use before slowing down producers -->
|
<!--
|
||||||
|
The systemUsage controls the maximum amount of space the broker will
|
||||||
|
use before slowing down producers. For more information, see:
|
||||||
|
|
||||||
|
http://activemq.apache.org/producer-flow-control.html
|
||||||
|
|
||||||
<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">
|
||||||
|
|
Loading…
Reference in New Issue