layout: default_md title: Broker URI title-class: page-title-activemq5 type: activemq5

Using ActiveMQ > Configuring Transports > ActiveMQ Connection URIs > Broker Configuration URI > Broker URI

Broker URI

The Broker URI allows you to run a configured broker using a single URI for all the configuration.

Syntax

The URI is assumed to be a composite uri with multiple uris that are used to bind the connectors of the broker.

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

If a composite URI use the network: scheme, then the rest of the URI is bound as a network connector.

Broker Options
Option NameDefault ValueDescription
useJmxrueShould the broker be exposed to JMX?
persistenttrueShould the broker use persistent storage
populateJMSXUserIDfalseShould the broker populate the JMSXUserID property of messages to indicate the authenticated sender username who sent the message
useShutdownHooktrueshould the broker install a shutdown hook so that it can properly shut itself down on a JVM kill
brokerNamelocalhostThe name of the broker
deleteAllMessagesOnStartupfalseShould all the messages in the persistent store be deleted on broker startup
enableStatisticstrueShould statistics gathering be enabled
Example URI

The following example starts up a broker accepting connections on port 61616, and establishes a network connection to remotehost:61616 and disables persistence.

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

You can use the Broker URI on other transports

If you are using another transport - such as the VM Transport Reference then you can refer to the above broker URI properties inside that URL. e.g. using the URL

vm://localhost?broker.persistent=false