ActiveMQ Xml Reference

This page contains a link to the XML reference guides and XML schema documents for Xml Configuration with ActiveMQ releases

Released Schemas

Reference Document


XML Schema

XML Schema namespace

XBean XML Reference 4.1


XBean XML Reference 5.0


XBean XML Reference 5.1


XBean XML Reference 5.2


XBean XML Reference 5.3.0


XBean XML Reference 5.3.1


XBean XML Reference 5.3.2


XBean XML Reference 5.4.0


XBean XML Reference 5.4.1


XBean XML Reference 5.4.2


XBean XML Reference 5.5.0


XBean XML Reference 5.6.0


XBean XML Reference 5.7.0


XBean XML Reference 5.8.0


XBean XML Reference 5.9.0


XBean XML Reference 5.10.0Reference
XBean XML Reference 5.10.1Reference
XBean XML Reference 5.10.2Reference
XBean XML Reference 5.11.0Reference
XBean XML Reference 5.11.1Reference

Using the XSDs in configuration files

If you are using XBean to parse the XML configurations, the XML validation is optional so you do not need to specify the XML Schema Locations. However if you are using Spring's 2.0 XML handling to parse the XML then you need to refer to the XSD locations in your XML document because Spring uses schema namespace or schema location to resolve namespace handlers. Without correct namespace definition you will get messages like below:

You can refer to a specific version of the XSD in your XML as follows

or if you prefer you can use a generic XSD without the version number

Your IDE won't be able to fetch this XSD, you'll have to manually associate a specific release; however it does mean that you won't have to upgrade your XML config file with each ActiveMQ release; as it will resolve this XSD using the bundled XSD inside the activemq-core.jar.

Pay attention to the namespace

If you use ActiveMQ 5.0 or earlier you XML namespace definition should point to If you use ActiveMQ 5.1 or later the namespace should point to

ActiveMQ 5.2 example
ActiveMQ 5.0 example

Both examples above are almost the same. Only one difference is xml namespace. You can find more information about the namespace change on activemq-dev topic: ActiveMQ namespace change.

Schema Validation

Note: The xml configuration ordering constraint is removed in 5.6, the broker element

Alphabetically Ordered XML Elements (5.4 - 5.5.1)

XMLSchema:sequence is replaced with an XMLSchema:all

Note: from version 5.4.2, you can disable validation from the command line by appending a query parameter to the xbean url. This will allow you to reuse your existing xml configuration 'as is' if needed.

Beginning in ActiveMQ 5.4, the XML elements inside the <broker> element must be ordered alphabetically. If you look at the XSD, this has always been the case with ActiveMQ. The difference in 5.4 is that the XML configuration is actually being validated against the XML schema.

For example, the following XML configuration did not present a problem in ActiveMQ 5.3.x:

However, in ActiveMQ 5.4, the XML configuration above would cause an exception similar to the following:

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'persistenceAdapter'. One of '{"":producerSystemUsage, "":proxyConnectors, "":regionBroker, "":services, "":shutdownHooks, "":sslContext, "":systemUsage, "":taskRunnerFactory, "":tempDataStore, "":transportConnectorURIs, "":transportConnectors, WC""}' is expected.

To avoid this XML validation error in ActiveMQ 5.4, simply change the ordering of the XML elements so that they are in alphabetical order. Below is an example of the same XML configuration but in alphabetical order:

Configurations can be easily tested against ActiveMQ 5.4 using the ActiveMQ startup script. Below is an example:

$ ./bin/activemq console xbean:file:/Users/bsnyder/SpringSource/clients/Finra/activemq-example-unordered.xml
INFO: Using default configuration
(you can configure options in one of these file: /etc/default/activemq /Users/bsnyder/.activemqrc)

INFO: Invoke the following command to create a configuration file
./bin/activemq setup [ /etc/default/activemq | /Users/bsnyder/.activemqrc ]

INFO: Using java '/System/Library/Frameworks/JavaVM.framework/Home/bin/java'
INFO: Starting in foreground, this is just for debugging purposes (stop process by pressing CTRL+C)
Java Runtime: Apple Inc. 1.6.0_20 /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
Heap sizes: current=258880k free=253106k max=258880k
JVM args: -Xms256M -Xmx256M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Dactivemq.classpath=/Users/bsnyder/amq/apache-activemq-5.4.1/conf; -Dactivemq.home=/Users/bsnyder/amq/apache-activemq-5.4.1 -Dactivemq.base=/Users/bsnyder/amq/apache-activemq-5.4.1
ACTIVEMQ_HOME: /Users/bsnyder/amq/apache-activemq-5.4.1
ACTIVEMQ_BASE: /Users/bsnyder/amq/apache-activemq-5.4.1
Loading message broker from: xbean:file:/Users/bsnyder/SpringSource/clients/Finra/activemq-example-unordered.xml

© 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