Skip to content

Instantly share code, notes, and snippets.

@mikewadhera
Created January 27, 2012 22:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikewadhera/655b3433e4949ddea57b to your computer and use it in GitHub Desktop.
Save mikewadhera/655b3433e4949ddea57b to your computer and use it in GitHub Desktop.
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
<!-- Allows us to use system properties as variables in this configuration file -->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="stagingapp1" dataDirectory="${activemq.base}/data">
<!--
Enable priorities for all queues
For more information, see:
http://activemq.apache.org/how-can-i-support-priority-queues.html
-->
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry queue=">" prioritizedMessages="true"/>
</policyEntries>
</policyMap>
</destinationPolicy>
<networkConnectors>
<networkConnector uri="static:(stomp://broker.staging.involver.local:61613)"
userName="involver"
password="REDACTED"/>
</networkConnectors>
<!--
Use KahaDB for persistence
For more information, see:
http://activemq.apache.org/kahadb.html
-->
<persistenceAdapter>
<kahaDB directory="${activemq.base}/data/kahadb" enableIndexWriteAsync="true"/>
</persistenceAdapter>
<plugins>
<simpleAuthenticationPlugin>
<users>
<authenticationUser username="involver" password="REDACTED"
groups="users,admins"/>
</users>
</simpleAuthenticationPlugin>
</plugins>
<!--
Use NIO transport
For more information, see:
http://activemq.apache.org/configuring-transports.html#ConfiguringTransports-TheNIOTransport
-->
<transportConnectors>
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613"/>
<transportConnector name="nio" uri="nio://0.0.0.0:61616"/>
</transportConnectors>
</broker>
</beans>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
<!-- Allows us to use system properties as variables in this configuration file -->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="stagingbroker" dataDirectory="${activemq.base}/data">
<destinationPolicy>
<policyMap>
<policyEntries>
<!--
Enable priorities for all queues
For more information, see:
http://activemq.apache.org/how-can-i-support-priority-queues.html
-->
<policyEntry queue=">" prioritizedMessages="true"/>
<!--
Tell the dead letter strategy not to process expired messages
so that they will just be discarded instead of being sent to
the DLQ
-->
<policyEntry queue=">">
<deadLetterStrategy>
<sharedDeadLetterStrategy processExpired="false" />
</deadLetterStrategy>
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>
<!--
Use KahaDB for persistence
For more information, see:
http://activemq.apache.org/kahadb.html
-->
<persistenceAdapter>
<kahaDB directory="${activemq.base}/data/kahadb" enableIndexWriteAsync="true"/>
</persistenceAdapter>
<plugins>
<simpleAuthenticationPlugin>
<users>
<authenticationUser username="involver" password="REDACTED"
groups="users,admins"/>
</users>
</simpleAuthenticationPlugin>
</plugins>
<!--
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>
<memoryUsage>
<memoryUsage limit="975 mb"/>
</memoryUsage>
</systemUsage>
</systemUsage>
<!--
Use NIO transport
For more information, see:
http://activemq.apache.org/configuring-transports.html#ConfiguringTransports-TheNIOTransport
-->
<transportConnectors>
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613"/>
<transportConnector name="nio" uri="nio://0.0.0.0:61616"/>
<transportConnector name="tcp" uri="tcp://0.0.0.0:61617"/>
</transportConnectors>
</broker>
<import resource="jetty.xml"/>
</beans>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment