You can configure a broker by appending a URL to the activemq command using the following syntax:
activemq
broker:(transportURI,network:networkURI)/brokerName?brokerOptions
For example:
activemq broker:(tcp://localhost:61616,network:static:tcp://remotehost:61616)?persistent=false&useJmx=true
You can include the following broker options to a configuration URI.
Table 1.1. URI Configuration: Broker Options
| Option | Default Value | Description |
|---|---|---|
| useJmx | true | Expose the broker to JMX |
| persistent | true | Enable the broker to use persistent storage |
| populateJMSXUserID | false | Have the broker populate the JMSXUserID property of messages to indicate the authenticated username of the sender |
| useShutdownHook | true | Have the broker install a shutdown hook so that it can properly shut itself down on a JVM kill |
| brokerName | localhost | The name of the broker |
| deleteAllMessagesOnStartup | false | Delete all the messages in the persistent store when the broker starts up |
| enableStatistics | true | Enable statistics gathering |