| Apache Qpid > Index > Qpid Java Documentation > Qpid Developer Documentation > Qpid Design - Configuration |
Home
Download
Getting Started
Documentation
Mailing Lists
Issue Reporting
FAQ/How to
Getting Involved
Qpid Integrated with..
Source Repository
Building Qpid
Developer Pages
QMF
People
License
Project Status
Acknowledgments
What is AMQP ?
AMQP Specification Download

QPID supports two methods of configuration:
It is intended that the configuration file will be used for nearly all configuration but that some very common or useful options are exposed using command line switches.
QPID uses Commons CLI to parse command line arguments. It provides the following features:
The result of parsing options, however they are specified, is a CommandLine object which can then be queried to find out specific values. Currently this is done in org.apache.qpid.server.Main and the CommandLine object is not exposed elsewhere but if it does require to be more widely used it could be added to the ApplicationRegistry. However it is strongly recommended that the configuration approach in the follow section is used where possible.
QPID uses Commons Configuration to handle all configuration. It provides methods that allow parsing of options from a range of sources, including configuration files, system properties or simply hard coded classes of values (which is very useful in unit test cases).
Broker configuration is accessed through the class in the org.apache.qpid.server.configuration, primarily starting at ServerConfiguration and retrieving values or other Configuration classes from there.
The following options are available:
| Option | Long Option | Description |
|---|---|---|
| b | bind | Bind to the specified address overriding any value in the config file |
| c | config | Use the given configuration file |
| h | help | Prints list of options |
| l | logconfig | Use the specified log4j.xml file rather than that in the etc directory |
| m | mport | Specify port to listen on for the JMX Management. Overrides value in config file |
| p | port | Specify port to listen on. Overrides value in config file |
| v | version | Print version information and exit |
| w | logwatch | Specify interval for checking for logging config changes. Zero means no checking |
Logging is handled slightly differently. The main reason for this is that logging is something we want configured before the main configuration file is processed.
The broker uses log4j as the logging implementation, and configuration must be done using the more expressive XML format. A couple of command line switches are used to configure logging:
By using the logwatch option it is possible to make changes to the logging configuration at runtime without restarting the broker. (For example, enabling more logging on certain packages in order to diagnose a problem).