%entities; ]> Getting Started
Introduction This section describes how to start and stop the Java Broker, and outlines the various command line options. For additional details about the broker configuration store and related command line arguments see . The broker is fully configurable via its Web Management Console, for details of this see .
Starting/Stopping the broker on Windows Firstly change to the installation directory used during the installation and ensure that the QPID_WORK environment variable is set. Now use the qpid-server.bat to start the server Output similar to the following will be seen: [Broker] BRK-1006 : Using configuration : C:\qpidwork\config.json [Broker] BRK-1007 : Using logging configuration : C:\qpid\&windowsExtractedBrokerDirName;\etc\log4j.xml [Broker] BRK-1001 : Startup : Version: &qpidCurrentRelease; Build: 1478262 [Broker] BRK-1010 : Platform : JVM : Oracle Corporation version: 1.7.0_21-b11 OS : Windows 7 version: 6.1 arch: x86 [Broker] BRK-1011 : Maximum Memory : 1,060,372,480 bytes [Broker] BRK-1002 : Starting : Listening on TCP port 5672 [Broker] MNG-1001 : JMX Management Startup [Broker] MNG-1002 : Starting : RMI Registry : Listening on port 8999 [Broker] MNG-1002 : Starting : JMX RMIConnectorServer : Listening on port 9099 [Broker] MNG-1004 : JMX Management Ready [Broker] MNG-1001 : Web Management Startup [Broker] MNG-1002 : Starting : HTTP : Listening on port 8080 [Broker] MNG-1004 : Web Management Ready [Broker] BRK-1004 : Qpid Broker Ready The BRK-1004 message confirms that the Broker is ready for work. The MNG-1002 and BRK-1002 confirm the ports to which the Broker is listening (for HTTP/JMX management and AMQP respectively). To stop the Broker, use Control-C or use the Shutdown MBean from the JMX management plugin.
Starting/Stopping the broker on Unix Firstly change to the installation directory used during the installation and ensure that the QPID_WORK environment variable is set. Now use the qpid-server script to start the server: Output similar to the following will be seen: [Broker] BRK-1006 : Using configuration : /var/qpidwork/config.json [Broker] BRK-1007 : Using logging configuration : /usr/local/qpid/&unixExtractedBrokerDirName;/etc/log4j.xml [Broker] BRK-1001 : Startup : Version: &qpidCurrentRelease; Build: exported [Broker] BRK-1010 : Platform : JVM : Sun Microsystems Inc. version: 1.6.0_32-b05 OS : Linux version: 3.6.10-2.fc16.x86_64 arch: amd64 [Broker] BRK-1011 : Maximum Memory : 1,065,025,536 bytes [Broker] BRK-1002 : Starting : Listening on TCP port 5672 [Broker] MNG-1001 : Web Management Startup [Broker] MNG-1002 : Starting : HTTP : Listening on port 8080 [Broker] MNG-1004 : Web Management Ready [Broker] MNG-1001 : JMX Management Startup [Broker] MNG-1002 : Starting : RMI Registry : Listening on port 8999 [Broker] MNG-1002 : Starting : JMX RMIConnectorServer : Listening on port 9099 [Broker] MNG-1004 : JMX Management Ready [Broker] BRK-1004 : Qpid Broker Ready The BRK-1004 message confirms that the Broker is ready for work. The MNG-1002 and BRK-1002 confirm the ports to which the Broker is listening (for HTTP/JMX management and AMQP respectively). To stop the Broker, use Control-C from the controlling shell, use the bin/qpid.stop script, use kill -TERM <pid>, or the Shutdown MBean from the JMX management plugin.
Log file The Java Broker writes a log file to record both details of its normal operation and any exceptional conditions. By default the log file is written within the log subdirectory beneath the work directory - $QPID_WORK/log/qpid.log (UNIX) and %QPID_WORK%\log\qpid.log (Windows). For details of how to control the logging, see
Using the command line The Java Broker understands a number of command line options which may be used to customise the configuration. For additional details about the broker configuration and related command line arguments see . The broker is fully configurable via its Web Management Console, for details of this see . To see usage information for all command line options, use the option ] [-h] [-icp ] [-l ] [-mm] [-mmhttp ] [-mmjmx ] [-mmpass ] [-mmqv] [-mmrmi ] [-os] [-sp ] [-st ] [-v] [-w ] -cic Create a copy of the initial config --create-initial-config file, either to an optionally specified file path, or as initial-config.json in the current directory -h, Print this message --help -icp Set the location of initial JSON config --initial-config-path to use when creating/overwriting a broker configuration store -l Use the specified log4j xml configuration --logconfig file. By default looks for a file named etc/log4j.xml in the same directory as the configuration file -mm Start broker in management mode, --management-mode disabling the AMQP ports -mmhttp Override http management port in --management-mode-http-port management mode -mmjmx Override jmx connector port in --management-mode-jmx-connector-port management mode -mmpass Set the password for the management --management-mode-password mode user mm_admin -mmqv Make virtualhosts stay in the quiesced --management-mode-quiesce-virtualhosts state during management mode. -mmrmi Override jmx rmi registry port in --management-mode-rmi-registry-port management mode -os Overwrite the broker configuration store --overwrite-store with the current initial configuration -prop "" Set a configuration property to use when --config-property "" resolving variables in the broker configuration store, with format "name=value" -sp Use given configuration store location --store-path -st Use given broker configuration store type --store-type -v Print the version information and exit --version -w Monitor the log file configuration file --logwatch for changes. Units are seconds. Zero means do not check for changes. ]]>