In versions prior to 5.4.0, the element order inside the broker
element was unimportant, because the XML configuration file was not validated. In version
5.5, however, the configuration file is validated against the Fuse Message Broker XML schema as it
is loaded. This means that the element's inside the broker element
must follow the order defined in the XML schema.
Tip
The element order is always alphabetical. The XML schema is generated by the XBeans utility, so alphabetical ordering is guaranteed.
If you have some legacy configuration files that are not alphabetically ordered, you might
prefer to skip the schema validation step. You can disable schema validation by setting the
validate=false option on the xbean URL. For example, to launch a broker on a
UNIX O/S using the configuration file, conf/activemq.xml,
without performing schema validation, enter the following
command:
./bin/activemq xbean:conf/activemq.xml?validate=false
In Fuse Message Broker 5.5, when deploying into the OSGi container, you have the option of embedding the broker XML inside a Blueprint configuration file, instead of using a Spring configuration file. The Fuse Message Broker Blueprint schema belongs to the following namespace:
http://activemq.apache.org/schema/blueprint
Example 1 shows an example of a Fuse Message Broker Blueprint configuration.
Example 1. Fuse Message Broker Blueprint configuraiton
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0" xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0" xmlns:amq="http://activemq.apache.org/schema/core"> <ext:property-placeholder /> <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${karaf.data}/activemq/localhost" useShutdownHook="false"> <destinationPolicy> <policyMap> <policyEntries> <policyEntry topic=">" producerFlowControl="true" memoryLimit="1mb"> <pendingSubscriberPolicy> <vmCursor /> </pendingSubscriberPolicy> </policyEntry> <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb"> </policyEntry> </policyEntries> </policyMap> </destinationPolicy> <managementContext> <managementContext createConnector="false"/> </managementContext> <persistenceAdapter> <kahaDB directory="${karaf.data}/activemq/localhost/kahadb"/> </persistenceAdapter> <transportConnectors> <transportConnector name="openwire" uri="tcp://localhost:61616"/> <transportConnector name="stomp" uri="stomp://localhost:61613"/> </transportConnectors> </broker> <bean id="activemqConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"> <property name="brokerURL" value="tcp://localhost:61616" /> </bean> <bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory"> <property name="maxConnections" value="8" /> <property name="connectionFactory" ref="activemqConnectionFactory" /> </bean> <bean id="resourceManager" class="org.apache.activemq.pool.ActiveMQResourceManager" init-method="recoverResource"> <property name="transactionManager" ref="transactionManager" /> <property name="connectionFactory" ref="activemqConnectionFactory" /> <property name="resourceName" value="activemq.localhost" /> </bean> <reference id="transactionManager" interface="javax.transaction.TransactionManager" /> <service ref="pooledConnectionFactory" interface="javax.jms.ConnectionFactory"> <service-properties> <entry key="name" value="localhost"/> </service-properties> </service> </blueprint>







