There are three ways to pass configuration to a broker instance at start-up:
XBean URI—specifies the location a Spring XML configuration file
Broker URI—specifies the broker configuration as part of the URI
Properties URI—specifies the location of properties file containing Fuse Message Broker configuration
XBean configuration uses a Fuse Message Broker XML configuration file to configure the broker. You
pass the location of the configuration file to the administrative tool using a URI prefixed with
xbean:
.
There are three ways to specify the location of the XML configuration file using an XBean URI:
on the Java classpath using the syntax
xbean:
fileName
For example the XBean URI
xbean:activemq.xml
specifies the fileactivemq.xml
that is located somewhere on the Java classpath.on the file system using the syntax
xbean:file:
filePath
For example the XBean URI
xbean:file:activemq.xml
specifies the fileactivemq.xml
that is located in the current directory.Tip You can specify both relative and absolute paths to the file.
on a resource path using the syntax
xbean:
resourcePath
For more information on the Fuse Message Broker XML configuration see the XML Configuration Reference.
You can specify a broker's configuration entirely on the command line using a broker URI of the form shown in Example 3.1.
transportURI
—a comma separated list of URIs at which the broker listens for client connectionsSee Broker Client Connectivity Guide for more information.
networkURI
—a comma separated list of URIs at which the broker listens for connections from other brokersSee Broker Networks in Clustering Guide for more information.
brokerName
—the broker's namebrokerOptions
—an ampersand(&) separated list configuration propertiesSee Table B.1 for a description of the properties.
For example, the URI shown in Example 3.2 starts up a
broker that accepts connections on port 61616, establishes a network connection to
remotehost:61616
, and disables persistence.
Example 3.2. Broker URI
broker:(tcp://localhost:61616,network:static:tcp://remotehost:61616)?persistent=false&useJmx=true
Property configuration uses a Java properties file to configure the broker. You pass the
location of the configuration file to the administrative tool using a URI prefixed with
properties:
. As with the XBean URI, you can specify a location on the classpath,
on the local file system, or using a resource path. For example the URI
properties:file:activemq.properties
specifies the file
activemq.properties
that is located in the current directory.
The properties file shown in Example 3.3 starts up a broker that accepts connections on port 61616, is named Cheese, and disables persistence and JMX.
See Appendix B for a description of all of the available properties.