Red Hat DocumentationToggle FramesPrintFeedback

Specifying the Broker's Configuration

Overview

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

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 file activemq.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 file activemq.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.

Broker URI

You can specify a broker's configuration entirely on the command line using a broker URI of the form shown in Example 6.

Example 6. Broker URI Syntax

broker:(transportURI,[network:networkURI])/[brokerName]?brokerOptions

  • transportURI—a comma separated list of URIs at which the broker listens for client connections

    See Broker Client Connectivity Guide for more information.

  • networkURI—a comma separated list of URIs at which the broker listens for connections from other brokers

    See Broker Networks in Clustering Guide for more information.

  • brokerName—the broker's name

  • brokerOptions—an ampersand(&) separated list configuration properties

    See ???? for a description of the properties.

For example, the URI shown in Example 7 starts up a broker that accepts connections on port 61616, establishes a network connection to remotehost:61616, and disables persistence.

Example 7. Broker URI

broker:(tcp://localhost:61616,network:static:tcp://remotehost:61616)?persistent=false&useJmx=true

Property configuration

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 8 starts up a broker that accepts connections on port 61616, is named Cheese, and disables persistence and JMX.

Example 8. Broker Properties File

useJmx = false
persistent = false
brokerName = Cheese

See ???? for a description of all of the available properties.

Comments powered by Disqus