2.2. Editing a Standalone Broker's Configuration
Revision History | |
---|---|
06/28/12 | |
updated to fit standard configuration pattern |
Abstract
A standalone Red Hat JBoss A-MQ message broker's configuration can be edited by directly modifying the configuration template and using the command console commands.
Overview
A standalone broker is one that is not part of a fabric. A standalone broker can, however, be part of a network of broker, a master/slave cluster, or a failover cluster. The distinction is that a standalone is responsible for managing and storing its own configuration.
All of the configuration changes are made directly on the local instance. You make changes using a combination of edits to local configuration template and commands from the console's config shell. The configuration template must be edited using an external editor. The configuration the control's the behavior of the broker's runtime container is changed using the console commands.
Editing the configuration template
The default broker configuration template is
etc/activemq.xml
. You can the location of the configuration template by changing the config property in the broker's etc/org.fusesource.mq.fabric.server-default.cfg
file.
The template can be edited using any text or XML editor.
The broker must be restarted for any changes in the template to take effect.
Editing the OSGi properties
The initial values for all of the OSGi properties configuring the broker are specified in the
etc/org.fusesource.mq.fabric.server-default.cfg
file. You can edit these values using the command console's config shell. The PID for these values are org.fusesource.mq.fabric.server.id
. The id is assigned by the container when the broker is started.
In addition to the broker's messaging behavior, a number of the broker's runtime behavior such as logging levels, the Web console behavior, and the JMX behavior are controlled by by OSGi properties stored in different PIDs.
To find the value for a broker's id use and the PIDs for the other runtime configuration settings, use the config:list command.
Config shell
The config shell has a series of commands for editing OSGi properties:
- config:list—lists all of the runtime configuration files and the current values for their properties
- config:edit—opens an editing session for a configuration file
- config:propset—changes the value of a configuration property
- config:propdel—deletes a configuration property
- config:update—saves the changes to the configuration file being edited