Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Info

This page applies to Java Broker versions before 0.14. For up to date information, please refer to the Configuring and Managing section in the Java broker book

Broker config.xml

...

Overview

The broker config.xml file which is shipped in the etc directory of any Qpid binary distribution details various options and configuration for the Java Qpid broker implementation.

File Format

This is an overview of the top level of the config file. Description of each section is embedded below. Each section is then described in detail in their own section.

No Format

<broker>
<!-- Various initial global definitions -->
    <connector>
<!-- Various connection information about the type connections the broker should listen for-->
    <management>
<!-- Enablement of management functionality -->
    <advanced>
<!-- Various advanced flags -->
    <security>
<!-- Definition of available security options -->
    <virtualhosts>
<!-- Definition of available virtual hosts -->
    <heartbeat>
<!-- Heartbeat configuration -->
    <queue>
<!-- General queue configuration options-->
    <virtualhosts>
<!-- Configuration of various virtual hosts. -->
</broker>

Broker

The setting of the prefixes for QPID_HOME and QPID_WORK allows environment variables to be used throughout the config.xml and removes the need for hard coding of paths in this file.

See the Getting Started Guide for more information on these variables.

No Format

<broker>
    <prefix>${QPID_HOME}</prefix>
    <work>${QPID_WORK}</work>
    <conf>${prefix}/etc</conf>

Connector

The connector section allows configuration of SSL and related keystore settings. By default this section is commented out and thus SSL is not enabled.

No Format

<connector>
    <!-- Uncomment out this block and edit the keystorePath and keystorePassword
         to enable SSL support
    <ssl>
        <enabled>true</enabled>
        <sslOnly>true</sslOnly>
        <keystorePath>/path/to/keystore.ks</keystorePath>
        <keystorePassword>keystorepass</keystorePassword>
    </ssl>-->
    <qpidnio>true</qpidnio>
    <transport>nio</transport>
    <port>5672</port>
    <sslport>8672</sslport>
    <socketReceiveBuffer>32768</socketReceiveBuffer>
    <socketSendBuffer>32768</socketSendBuffer>
</connector>

Management

This element allows the user to switch the connectivity of the management console on/off i.e. if the enabled tag is set to false you will not be able to connect a management console to this broker instance.

No Format

<management>
    <enabled>true</enabled>
</management>

Advanced

TBC

No Format

<advanced>
   <filterchain enableExecutorPool="true"/>
    <enablePooledAllocator>false</enablePooledAllocator>
    <enableDirectBuffers>false</enableDirectBuffers>
    <framesize>65535</framesize>
    <compressBufferOnQueue>false</compressBufferOnQueue>
</advanced>

Principal databases

This section lists all the principal databases that are available for authentication. These databases understand what SASL mechanisms can be used against their data and so are responsible for registering these SASL mechanisms. Currently we do not provide means of limiting these mechanisms. The proposal was to allow the virtualhosts to specify which database and mechanisms they wished to use however as documented in virtualhosts below this is not possible as currently in AMQP authentication occurs before the selection of a virtualhost.

No Format

<principal-databases>
    <principal-database>
        <!-- A name for referencing this database-->
        <name>passwordfile</name>
<!-- The type of principal database -->            <class>org.apache.qpid.server.security.auth.database.PlainPasswordVhostFilePrincipalDatabase</class>
        <!-- Any attributes associated with the database. Here it is a password file to load. -->
        <attributes>
            <attribute>
                <name>passwordFile</name>
                <value>${conf}/passwdVhost</value>
            </attribute>
        </attributes>
    </principal-database>

    <principal-database>
        <name>md5passwordfile</name>
        <class>org.apache.qpid.server.security.auth.database.MD5PasswordFilePrincipalDatabase</class>
        <attributes>
            <attribute>
                <name>passwordFile</name>
                <value>${conf}/md5passwd</value>
            </attribute>
        </attributes>
    </principal-database>
</principal-databases>

Virtualhosts

This section allows you to define the set of virtual hosts which will be contained in your broker instance, and the message store & location for each. The commented out section referencing BDBMessageStore should be used for all applications wishing to use persistence to disk.

If you are using transient messaging you can use the MemoryMessageStore, with the caveat that scalability for transient use is limited by heap size.

No Format

<virtualhosts>
    <virtualhost>
        <name>localhost</name>
        <localhost>
            <store>
                <!--class>org.apache.qpid.server.store.berkeleydb.BDBMessageStore</class>
                        <environment-path>${work}/bdb/localhost-store</environment-path-->
                <class>org.apache.qpid.server.store.MemoryMessageStore</class>
            </store>

            <security>
                <!-- Need protocol changes to allow this-->
                <authentication>
                    <name>passwordfile</name>
                    <!-- Currently this can't be used as Vhost isn't specified at connection start only connection open -->
                    <mechanism>PLAIN</mechanism>
                </authentication>
                
                <access>
                    <!-- This is the type of AccessManager to use.-->
                    <class>org.apache.qpid.server.security.access.PrincipalDatabaseAccessManager</class>
                    <attributes>
                        <attribute>
                            <name>principalDatabase</name>
                            <value>passwordfile</value>
                        </attribute>
                        <attribute>
                            <!-- The defaultAccessManager can be either DenyAll or AllowAll -->
                            <name>defaultAccessManager</name>
                            <value>DenyAll</value>
                        </attribute>
                    </attributes>
                </access>
            </security>

        </localhost>
    </virtualhost>

    <virtualhost>
        <name>development</name>
        <development>
            <store>
                <class>org.apache.qpid.server.store.MemoryMessageStore</class>
            </store>
        </development>
    </virtualhost>

    <virtualhost>
        <name>test</name>
        <test>
            <store>
                <class>org.apache.qpid.server.store.MemoryMessageStore</class>
            </store>
        </test>
    </virtualhost>
</virtualhosts>

Heartbeat

The Qpid broker sends an internal (only) heartbeat. This element allows configuration of the frequency of this heartbeat. At present, we recommend that you leave this section unchanged !

No Format

<heartbeat>
    <delay>0</delay>
    <timeoutFactor>2.0</timeoutFactor>
</heartbeat>

Queue

This should NOT be changed lightly as it sets the broker up to automatically bind queues to exchanges.

It could theoretically be used to prevent users creating new queues at runtime, assuming that you have created all queues/topics etc at broker startup. However, best advice is to leave unchanged for now.

No Format

<queue>
    <auto_register>true</auto_register>
</queue>

Virtualhosts

This element allows you to specify a location for the virtualhosts.xml file that you wish to use. If you are not using a subdirectory under $QPID_HOME you can provide a fully qualified path instead.

In tandem with the virtualhosts.xml file, the config.xml file allows you to control much of the deployment detail for your Qpid broker in a flexible fashion.

Note that you can pass the config.xml you wish to use for your broker instance to the broker using the -c command line option. In turn, you can specify the paths for the broker password file and virtualhosts.xml files in your config.xml for simplicity.

For more information about command line configuration options please see Qpid Design - Configuration.

Qpid Version

The config format has changed between versions here you can find the configuration details on a per version basis.

M2 - config.xml
M2.1 - config.xml
0.13 - config.xml

...