Chapter 3. Options for Running the Broker
The broker can be run with a number of options. An overview of the most common options are given here.
For options that persist across sessions, you can put the options in the configuration file. Open the /etc/qpidd.conf file in your preferred text editor to make the necessary changes.
This example uses the configuration file to store any output to the /var/log/qpidd.log file, and enable debug tracing. Changes will take effect from the next time the broker is started and will be used in every subsequent session.
# Configuration file for qpidd log-output=/var/log/qpidd.log trace=1
If you are running the broker as a service, you will need to restart the service once you have made the changes.
# service qpidd restart Stopping qpidd daemon: [ OK ] Starting qpidd daemon: [ OK ]
If you are not running the broker as a service, you can now start the broker as normal.
# /usr/sbin/qpidd -t [date] [time] info Locked data directory: /var/lib/qpidd [date] [time] info Management enabled [date] [time] info Listening on port 5672
To set options for a single instance, add the option to the command line when you start the broker. You will need to be the root user.
This example uses command line options to start the broker with debug tracing and store any output to the /var/log/qpidd.log file. These options will need to be explicitly stated every time the broker is run.
# /usr/sbin/qpidd -t --log-output /var/log/qpidd.log
For more options, type # man qpidd or # /usr/sbin/qpidd --help at the shell prompt.
| General options for running the broker | |
|---|---|
-t
|
This option enables debug tracing, with output printed to the screen. |
-p <Port_Number>
|
Instructs the broker to use the specified port. Defaults to port 5672. It is possible to run multiple brokers simultaneously by using different port numbers. |
-v
|
Displays the installed version. |
-h
|
Displays the help message. |
| Options for running the broker as a service | |
|---|---|
-d
|
This option instructs rhmd to run in the background as a daemon. Messages retrieved using a consumer are displayed, but any output usually displayed by the broker is supressed. |
-q
|
When the broker is running as a daemon this command shuts the broker down politely; that is, by closing the child processes, followed by the parent processes. |
-c
|
This command checks if the daemon is already running. If it is running, it returns the process ID number. |
-d --wait=<seconds>
|
This sets the maximum wait time (in seconds) for the daemon to initialize. If the daemon has not successfully completed initialization within this time, an error is returned. This option must be used in conjunction with the -d option, or it will be ignored.
|