Menu Search

Appendix A. Environment Variables

The following table describes the environment variables understood by the Qpid scripts contained within the /bin directory within the Broker distribution.

To take effect, these variables must be set within the shell (and exported - if using Unix) before invoking the script.

Table A.1. Environment variables

Environment variableDefaultPurpose
QPID_HOME

None

The variable used to tell the Broker its installation directory. It must be an absolute path. This is used to determine the location of Qpid's dependency JARs and some configuration files.

Typically the value of this variable will look similar to c:\qpid\qpid-broker\\8.0.6 (Windows) or /usr/local/qpid/qpid-broker/8.0.6 (Unix). The installation prefix will differ from installation to installation.

If not set, a value for QPID_HOME is derived from the location of the script itself.

QPID_WORK

User's home directory

Used as the default root directory for any data written by the Broker. This is the default location for any message data written to persistent stores and the Broker's log file.

For example, QPID_WORK=/var/qpidwork.

QPID_OPTS

None

This is the preferred mechanism for passing Java system properties to the Broker. The value must be a list of system properties each separate by a space. -Dname1=value1 -Dname2=value2.

QPID_JAVA_GC -XX:+HeapDumpOnOutOfMemoryError -XX:+UseConcMarkSweepGC

This is the preferred mechanism for customising garbage collection behaviour. The value should contain valid garbage collection options(s) for the target JVM.

Refer to the JVM's documentation for details.

QPID_JAVA_MEM -Xmx512m -XX:MaxDirectMemorySize=1536m

This is the preferred mechanism for customising the size of the JVM's heap and direct memory. The value should contain valid memory option(s) for the target JVM. Oracle JVMs understand -Xmx to specify a maximum heap size, -Xms an initial size, and -XX:MaxDirectMemorySize for the maximum amount of direct memory.

For example, QPID_JAVA_MEM="-Xmx6g -XX:MaxDirectMemorySize=12g" would set a maximum heap size of 6GB and 12GB of direct memory.

Refer to the JVM's documentation for details.

JAVA_OPTSNone

This is the preferred mechanism for passing any other JVM options. This variable is commonly used to pass options for diagnostic purposes, for instance to turn on verbose GC. -verbose:gc.

Refer to the JVM's documentation for details.