There is an updates XML syntax for configuring message brokers - see here

So we decided that using XML would make this configuration much easier. we use XBean to perform the XML configuration.

For details of the XML see the Xml Reference

Be careful with broker names and URIs

Make sure you do not use any strange characters in the names of brokers as they are converted to URIs which do not allow things like underscores in them etc.


The default ActiveMQ configuration: current default config.

  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 in this configuration file -->
    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
   <!-- Allows accessing the server log -->
    <bean id="logQuery" class="io.fabric8.insight.log.log4j.Log4jLogQuery"
          lazy-init="false" scope="singleton"
          init-method="start" destroy-method="stop">
        The <broker> element is used to configure the ActiveMQ broker.
    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}">
                <policyEntry topic=">" >
                    <!-- The constantPendingMessageLimitStrategy is used to prevent
                         slow topic consumers to block producers and affect other consumers
                         by limiting the number of messages that are retained
                         For more information, see:
                    <constantPendingMessageLimitStrategy limit="1000"/>

            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:
            <managementContext createConnector="false"/>
            Configure message persistence for the broker. The default persistence
            mechanism is the KahaDB store (identified by the kahaDB tag).
            For more information, see:
            <kahaDB directory="${activemq.data}/kahadb"/>

            The systemUsage controls the maximum amount of space the broker will
            use before disabling caching and/or slowing down producers. For more information, see:
                    <memoryUsage percentOfJvmHeap="70" />
                    <storeUsage limit="100 gb"/>
                    <tempUsage limit="50 gb"/>
            The transport connectors expose ActiveMQ over a given protocol to
            clients and other brokers. For more information, see:
            <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
            <transportConnector name="openwire" uri="tcp://;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="amqp" uri="amqp://;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="stomp" uri="stomp://;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="mqtt" uri="mqtt://;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="ws" uri="ws://;wireFormat.maxFrameSize=104857600"/>
        <!-- destroy the spring context on shutdown to stop jetty -->
            <bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" />
        Enable web consoles, REST and Ajax APIs and demos
        The web consoles requires by default login, you can disable this in the jetty.xml file
        Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details
    <import resource="jetty.xml"/>

From the binary distributionthere is an activemq script allowing you to run a Message Broker as a stand alone process from the command line easily providing the $ACTIVEMQ_HOME/bin directory is on your PATH.

© 2004-2011 The Apache Software Foundation.
Apache ActiveMQ, ActiveMQ, Apache, the Apache feather logo, and the Apache ActiveMQ project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
Graphic Design By Hiram