Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <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">
- <property name="locations">
- <value>file:${activemq.base}/conf/messaging.properties</value>
- </property>
- </bean>
- <!-- The <broker> element is used to configure the ActiveMQ broker. -->
- <broker xmlns="http://activemq.apache.org/schema/core"
- brokerName="${broker.name}" dataDirectory="${activemq.base}/../data" waitForSlave="${cluster.replication}">
- <!-- 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>
- <policyMap>
- <policyEntries>
- <policyEntry topic=">" producerFlowControl="false" advisoryWhenFull="true">
- <pendingSubscriberPolicy>
- <fileCursor />
- </pendingSubscriberPolicy>
- </policyEntry>
- <policyEntry queue=">" producerFlowControl="false" advisoryWhenFull="true">
- <deadLetterStrategy>
- <!-- Use the prefix 'DLQ.' for the destination name, and make the
- DLQ a queue rather than a topic -->
- <individualDeadLetterStrategy
- queuePrefix="DLQ." useQueueForQueueMessages="true" processNonPersistent="true" />
- </deadLetterStrategy>
- <!-- Use VM cursor for better latency For more information, see: http://activemq.apache.org/message-cursors.html -->
- <pendingQueuePolicy>
- <fileQueueCursor />
- </pendingQueuePolicy>
- </policyEntry>
- </policyEntries>
- </policyMap>
- </destinationPolicy>
- <!-- Default destinations -->
- <destinations>
- </destinations>
- <!-- The managementContext is used to configure how ActiveMQ is exposed
- in JMX. By default, ActiveMQ uses the MBean server that is started by the
- JVM. For more information, see: http://activemq.apache.org/jmx.html -->
- <managementContext>
- <managementContext createConnector="true" />
- </managementContext>
- <!-- The store and forward broker networks ActiveMQ will listen to Create
- a duplex connector to the first broker -->
- <networkConnectors>
- <!-- This Marker will be replaced by the startstop script -->
- <networkConnector name="mq-clusterA-server01-master" uri="static:(failover:(tcp://mq-clusterA-server01-master:61618,tcp://mq-clusterA-server01-slave-01:61618)?randomize=false)" duplex="false" userName="admin" password="admin" bridgeTempDestinations="false" />
- <networkConnector name="mq-clusterA-server02-master" uri="static:(failover:(tcp://mq-clusterA-server02-master:61618,tcp://mq-clusterA-server02-slave-01:61618)?randomize=false)" duplex="false" userName="admin" password="admin" bridgeTempDestinations="false" />
- </networkConnectors>
- <!-- Configure message persistence for the broker. The default persistence
- mechanism is the KahaDB store (identified by the kahaDB tag). For more information,
- see: http://activemq.apache.org/persistence.html -->
- <persistenceAdapter>
- <kahaDB directory="${activemq.base}/../data/kahadb" />
- </persistenceAdapter>
- <!-- Simple Authentication -->
- <plugins>
- <!-- use JAAS to authenticate using the login.config file on the classpath
- to configure JAAS -->
- <jaasAuthenticationPlugin configuration="globaldataAuthentication" />
- <!-- lets configure a destination based authorization mechanism -->
- <bean xmlns="http://www.springframework.org/schema/beans" id="authPlugin"
- class="org.apache.activemq.security.AuthorizationPlugin">
- <property name="map">
- <bean id="globaldataAuthorizationMap" class="..." \>
- </property>
- </bean>
- <!-- load the statistics plugin for metering and memory monitoring -->
- <statisticsBrokerPlugin />
- </plugins>
- <systemUsage>
- <systemUsage sendFailIfNoSpace="true">
- <memoryUsage>
- <memoryUsage limit="1 gb" />
- </memoryUsage>
- <storeUsage>
- <storeUsage limit="10 gb" />
- </storeUsage>
- <tempUsage>
- <tempUsage limit="20 gb" />
- </tempUsage>
- </systemUsage>
- </systemUsage>
- <!-- The transport connectors expose ActiveMQ over a given protocol to
- clients and other brokers. For more information, see: http://activemq.apache.org/configuring-transports.html -->
- <transportConnectors>
- <transportConnector name="stomp"
- uri="stomp://0.0.0.0:61612?transport.closeAsync=false" />
- <transportConnector name="stomp+nio"
- uri="stomp+nio://0.0.0.0:61613?transport.closeAsync=false" />
- <transportConnector name="openwire-external" uri="tcp://0.0.0.0:61616" />
- <transportConnector name="openwire-internal" uri="tcp://0.0.0.0:61617" />
- <transportConnector name="openwire-cluster" uri="tcp://0.0.0.0:61618" />
- </transportConnectors>
- </broker>
- <!-- Uncomment to enable Camel Take a look at activemq-camel.xml for more
- details <import resource="camel.xml"/> -->
- <!-- Enable web consoles and REST API Take a look at activemq-jetty.xml
- for more details -->
- <import resource="jetty.xml" />
- </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement