Description of the active MQ configuration file

Source: Internet
Author: User
Tags xmlns
<!--
Licensed to the Apache software Foundation (ASF) under one or more
Contributor license agreements. See the NOTICE file distributed with
This is for additional information regarding copyright ownership.
The ASF licenses this file to you under the Apache License, Version 2.0
(the "License"); Except in compliance with
The License. Obtain a copy of the License at


http://www.apache.org/licenses/LICENSE-2.0


Unless required by applicable law or agreed to writing, software
Distributed under the License is distributed on a "as is" BASIS,
Without warranties or CONDITIONS of any KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-
<!--START Snippet:example--
<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.xsd
Http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd ">


<!--allows us to use system properties as variables on this configuration file--
<bean class= "Org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" >
<property name= "Locations" >
<value>file:${activemq.conf}/credentials.properties</value>
</property>
</bean>


<!--
The <broker> element is used to configure the ActiveMQ broker.
-
<broker xmlns= "http://activemq.apache.org/schema/core" brokername= "localhost" usejmx= "true" datadirectory= "${ Activemq.data} ">


<!--
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= "true" >
<!--the constantpendingmessagelimitstrategy is used to prevent
Slow topic consumers to block producers and affect other consumers
By limiting the number of messages that is retained
For more information, see:


Http://activemq.apache.org/slow-consumer-handling.html


-
<pendingMessageLimitStrategy>
<constantpendingmessagelimitstrategy limit= "/>"
</pendingMessageLimitStrategy>
</policyEntry>
<policyentry queue= ">" producerflowcontrol= "true" memorylimit= "1MB" >
<!--use VMS cursor for better latency
For more information, see:


Http://activemq.apache.org/message-cursors.html


<pendingQueuePolicy>
<vmQueueCursor/>
</pendingQueuePolicy>
-
<deadLetterStrategy>
<individualdeadletterstrategy
Queueprefix= "DLQ." usequeueforqueuemessages= "true"/>
</deadLetterStrategy>
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>




<!--
The managementcontext is used to configure how ActiveMQ are exposed in
Jmx. By default, ActiveMQ uses the MBean server, which is started by
The JVM. For more information, see:


Http://activemq.apache.org/jmx.html
-
<managementContext>
<managementcontext createconnector= "true" connectorport= "1099" jmxdomainname= "Test.domain"/>
</managementContext>


<!--
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>
&LT;KAHADB directory= "${activemq.data}/kahadb"/>
</persistenceAdapter>




<!--
The Systemusage controls the maximum amount of space the broker would
Use before slowing down producers. For more information, see:
Http://activemq.apache.org/producer-flow-control.html
If using ActiveMQ embedded-the following limits could safely be used:


<systemUsage>
<systemUsage>
<memoryUsage>
<memoryusage limit= "MB"/>
</memoryUsage>
<storeUsage>
<storeusage limit= "1 GB"/>
</storeUsage>
<tempUsage>
<tempusage limit= "MB"/>
</tempUsage>
</systemUsage>
</systemUsage>
-
<systemUsage>
<systemUsage>
<memoryUsage>
<memoryusage limit= "MB"/>
</memoryUsage>
<storeUsage>
<storeusage limit= "1 GB"/>
</storeUsage>
<tempUsage>
<tempusage limit= "1 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>
<!--DOS protection, limit concurrent connections to $ and frame size to 100MB--
<transportconnector name= "Openwire" uri= "tcp://0.0.0.0:61616?maximumconnections=1000&amp; wireformat.maxframesize=104857600 "/>
<transportconnector name= "AMQP" uri= "amqp://0.0.0.0:5672?maximumconnections=1000&amp; wireformat.maxframesize=104857600 "/>
</transportConnectors>


<!--destroy the spring context on shutdown to stop jetty--
<shutdownHooks>
<bean xmlns= "Http://www.springframework.org/schema/beans" class= "Org.apache.activemq.hooks.SpringContextHook" />
</shutdownHooks>


</broker>


<!--
Enable Web consoles, REST and Ajax APIs and demos


Take a look at ${activemq_home}/conf/jetty.xml for more details
-
<import resource= "Jetty.xml"/>


</beans>
<!--END Snippet:example--

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.