%entities; ]> Getting Started This section describes how to start the Java Broker for the first time. The Broker configuration details and configuration command line arguments are described in .
Starting/Stopping the Broker To start the Broker, use the qpid-server script (UNIX) or qpid-server.bat (Windows) provided within distribution.
Starting/Stopping 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\qpid-broker-&qpidCurrentRelease;\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 made from the
Starting/Stopping 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/qpid-broker-&qpidCurrentRelease;/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
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 override the configuration. 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, 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,--config-property set a configuration property to use when 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. ]]>