Appendix A. Configuration Reference

This section is a quick index for looking up configuration values. Click on the element name to go to the specific chapter.

A.1. Server Configuration

A.1.1. hornetq-configuration.xml

The hornetq-configuration.xml file contains the core server configuration. The file is located in <JBOSS_HOME>/jboss-as/server/<PROFILE>/deploy/hornetq/hornetq-configuration.xml.

Table A.1. Server Configuration

Element Name Type Description Default
backup Boolean if true, this server is a backup to another node in the cluster. false
allow-failback Boolean Specifies whether the backup server automatically stops and returns to standby mode when the live server becomes available again. If set to false, the server must be stopped manually to trigger a return to standby mode. true
failover-on-shutdown Boolean Specifies how fail-over behaves when a live server is shutdown correctly. If set to true, the backup HornetQ instance takes over when the live server is shut down gracefully. false
shared-store Specifies whether the server should reference a shared store for journaling. false
grouping-handler Parent element Used to specify the LOCAL and REMOTE grouping handlers.
remoting-interceptors Parent element Used to specify class names, using <class-name>. Refer to Chapter 42, Intercepting Operations for detailed information about this element.
address-full-policy String Supports three values: PAGE, DROP, and BLOCK. Refer to Section 22.3, “Paging Mode” PAGE
send-to-dla-on-no-route Boolean Specifies how messages are handled when a server does not routes the message to a queue. If set to true, the message is sent to the dead letter address (DLA) for the routed address, if a DLA exists. If a DLA does not exist, the message is dropped as a last resort. Refer to Section 23.3, “Configuring Queues Through Address Settings” for more information about Address Setting elements. false
backup-connector-ref String the name of the remoting connector to connect to the backup node.
bindings-directory String the directory in which to store the persisted bindings. data/bindings
clustered Boolean if true, the server is clustered. false
connection-ttl-override Long if set, overrides the time (in ms) to keep a connection alive without receiving a ping. -1
create-bindings-dir Boolean true means that the server will create the bindings directory on start up. true
create-journal-dir Boolean if true, the journal directory will be created. true
file-deployment-enabled Boolean if true, the server loads configuration from the configuration files. true
id-cache-size Integer the size of the cache for pre-creating message IDs. 2000
journal-buffer-size Long The size of the internal buffer on the journal. 128 kilobytes
journal-buffer-timeout Long the timeout (in nanoseconds) used to flush internal buffers on the journal. 20000
journal-compact-min-files Integer the minimum number of data files before compacting occurs. 10
journal-compact-percentage Integer the percentage of live data on which we consider compacting the journal. 30
journal-directory String the directory to store the journal files in. data/journal
journal-file-size Long the size (in bytes) of each journal file. 128 * 1024
journal-max-io Integer the maximum number of write requests that can be in the AIO queue at any one time. 500
journal-min-files Integer the number of journal files to pre-create. 2
journal-sync-transactional Boolean if true, wait for transaction data to be synchronized to the journal before returning response to client. true
journal-sync-non-transactional Boolean if true, wait for non-transaction data to be synced to the journal before returning response to client. true
journal-type String the type of journal to use. NIO
jmx-management-enabled Boolean if true, the management API is available via JMX. true
jmx-domain String the JMX domain used to registered HornetQ MBeans in the MBeanServer. org.hornetq
large-messages-directory String the directory in which to store large messages. The default location is data/largemessages
management-address String the name of the management address to send management messages to. The default value is jms.queue.hornetq. management
cluster-user String the user used by cluster connections to communicate between the clustered nodes. The default value is HORNETQ.CLUSTER.ADMIN. USER See Description
cluster-password String the password used by cluster connections to communicate between the clustered nodes. CHANGE ME!!
management-notification-address String the name of the address that consumers bind to receive management notifications. The default value is hornetq.notifications See Description
message-counter-enabled Boolean if true, message counters are enabled. false
message-counter-max-day-history Integer how many days to keep message counter history. 10
message-counter-sample-period Long the sample period (in ms) to use for message counters. 10000
message-expiry-scan-period Long how often (in ms) to scan for expired messages. 30000
message-expiry-thread-priority Integer the priority of the thread expiring messages. 3
paging-directory String the directory to store paged messages in. data/paging
page-max-concurrent-io Integer The maximum number of concurrent reads the system can make on the paging files. 5
persist-delivery-count-before-delivery Boolean if true, delivery count is persisted before delivery; if false, this occurs only after a message has been canceled. false
persistence-enabled Boolean true means that the server will use the file based journal for persistence. true
persist-id-cache Boolean true means that id's are persisted to the journal. true
scheduled-thread-pool-max-size Integer the number of threads that the main scheduled thread pool has. 5
security-enabled Boolean if true, security is enabled. true
security-invalidation-interval Long how long (in ms) to wait before invalidating the security cache. 10000
thread-pool-max-size Integer the number of threads that the main thread pool has; -1 sets unlimited threads. 30
async-connection-execution-enabled Boolean should incoming packets on the server be handed off to a thread from the thread pool for processing or should they be handled on the remoting thread? true
transaction-timeout Long how long (in ms) before a transaction can be removed from the resource manager after create time. 60000
transaction-timeout-scan-period Long how often (in ms) to scan for timeout transactions. 1000
wild-card-routing-enabled Boolean true means that the server supports wild card routing. true
memory-measure-interval Long frequency to sample JVM memory in ms (or -1 to disable memory sampling). -1
memory-warning-threshold Integer Percentage of available memory which threshold a warning log. 25
connectors String a list of remoting connectors configurations to create.
connector.name (attribute) String Name of the connector - mandatory.
connector.factory-class String Name of the ConnectorFactory implementation - mandatory.
connector.param String A key-value pair used to configure the connector. A connector can have many param.
connector.param.key (attribute) String Key of a configuration parameter - mandatory.
connector.param.value (attribute) String Value of a configuration parameter - mandatory.
acceptors String a list of remoting acceptors to create.
acceptor.name (attribute) String Name of the acceptor - optional.
acceptor.factory-class String Name of the AcceptorFactory implementation - mandatory.
acceptor.param String A key-value pair used to configure the acceptor. An acceptor can have many param.
acceptor.param.key (attribute) String Key of a configuration parameter - mandatory.
acceptor.param.value (attribute) String Value of a configuration parameter - mandatory.
broadcast-groups a list of broadcast groups to create.
broadcast-group.name (attribute) String a unique name for the broadcast group - mandatory.
broadcast-group.local-bind-address String local bind address that the datagram socket is bound to. The default value is the wildcard IP address chosen by the kernel See Description
broadcast-group.local-bind-port Integer local port to which the datagram socket is bound to. -1 (anonymous port)
broadcast-group.group-address String multicast address to which the data will be broadcast - mandatory.
broadcast-group.group-port Integer UDP port number used for broadcasting - mandatory.
broadcast-group.broadcast-period Long period in milliseconds between consecutive broadcasts. 2000 (ms)
broadcast-group.connector-ref Integer A pair connector and optional backup connector that will be broadcast. A broadcast-group can have multiple connector-ref.
broadcast-group.connector-ref.connector-name (attribute) String Name of the live connector - mandatory.
broadcast-group.connector-ref.backup-connector-name (attribute) String Name of the backup connector - optional.
discovery-groups String a list of discovery groups to create.
discovery-group.name (attribute) String A unique name for the discovery group - mandatory.
discovery-group.local-bind-address String The discovery group will be bound only to this local address.
discovery-group.group-address String Multicast IP address of the group to listen on - mandatory.
discovery-group.group-port Integer UDP port of the multicast group - mandatory
discovery-group.refresh-timeout Integer Period the discovery group waits after receiving the last broadcast from a particular server before removing that servers connector pair entry from its list. 5000 (ms)
diverts String A list of diverts to use.
divert.name (attribute) String A unique name for the divert - mandatory.
divert.routing-name String The routing name for the divert - mandatory.
divert.address String The address this divert will divert from - mandatory.
divert.forwarding-address String The forwarding address for the divert - mandatory.
divert.exclusive Boolean Is this divert exclusive? false
divert.filter String An optional core filter expression. null
divert.transformer-class-name String An optional class name of a transformer.
queues String A list of pre configured queues to create.
queues.name (attribute) String Unique name of this queue.
queues.address String Address for this queue - mandatory.
queues.filter String Optional core filter expression for this queue. null
queues.durable Boolean Is this queue durable? true
bridges String A list of bridges to create.
bridges.name (attribute) String Unique name for this bridge.
bridges.queue-name String Name of queue that this bridge consumes from - mandatory.
bridges.forwarding-address String Address to forward to. If omitted original address is used. null
bridges.filter String Optional core filter expression. null
bridges.transformer-class-name String Optional name of transformer class. null
bridges.retry-interval Long Period (in ms) between successive retries. 2000 (ms)
bridges.retry-interval-multiplier Double Multiplier to apply to successive retry intervals. 1.0
bridges.reconnect-attempts Integer Maximum number of retry attempts, -1 signifies infinite. -1
bridges.fail-over-on-server-shutdown Boolean Should fail-over be prompted if target server is cleanly shutdown? false
bridges.use-duplicate-detection Boolean Should duplicate detection headers be inserted in forwarded messages? true
bridges.discovery-group-ref String Name of discovery group used by this bridge. null
bridges.connector-ref.connector-name (attribute) String Name of connector to use for live connection.
bridges.connector-ref.backup-connector-name (attribute) String Optional name of connector to use for backup connection. null
cluster-connections String A list of cluster connections.
cluster-connections.name (attribute) String Unique name for this cluster connection.
cluster-connections.address String Name of address this cluster connection applies to.
cluster-connections.forward-when-no-consumers Boolean Should messages be load balanced if there are no matching consumers on target? false
cluster-connections.min-large-message-size Integer Message size threshold over which the message will be split into multiple packages when sent over the cluster. 100 kB
cluster-connections.reconnect-attempts Integer Number of times the system will try to connect a node on the cluster, after which (if max-retry has been reached) the node will be considered permanently down and the system will stop routing messages to this node. -1 (infinite retries)
cluster-connections.max-hops Integer Maximum number of hops cluster topology is propagated. 1
cluster-connections.retry-interval Long Period (in ms) between successive retries. 2000
cluster-connections.use-duplicate-detection Boolean Should duplicate detection headers be inserted in forwarded messages? true
cluster-connections.discovery-group-ref String Name of discovery group used by this bridge. null
cluster-connections.connector-ref.connector-name (attribute) String Name of connector to use for live connection.
cluster-connections.connector-ref.backup-connector-name (attribute) String Optional name of connector to use for backup connection. null
cluster-connections.min-large-message-size Integer Maximum threshold of message size, over which it will be split into multiple packages when sent over the cluster. 100 kB
cluster-connections.reconnect-attempts Integer Maximum number of times the system will try to connect a node on the cluster. If the max-retry is achieved this node will be considered permanently down and the system will stop routing messages to this node. -1 (infinite retries)
security-settings String A list of security settings.
security-settings.match (attribute) String The string to use for matching security against an address.
security-settings.permission String A permission to add to the address.
security-settings.permission.type (attribute) String The type of permission.
security-settings.permission.roles (attribute) String A comma-separated list of roles to apply the permission to.
address-settings String A list of address settings.
address-settings.dead-letter-address String The address to send dead messages to.
address-settings.max-delivery-attempts Integer How many times to attempt to deliver a message before sending to dead letter address. 10
address-settings.expiry-address String The address to send expired messages to.
address-settings.redelivery-delay Long The time (in ms) to wait before redelivering a canceled message. 60000 (ms)
address-settings.last-value-queue boolean Whether to treat the queue as a last value queue. false
address-settings.page-size-bytes Long The page size (in bytes) to use for an address. 10 * 1024 * 1024
address-settings.max-size-bytes Long The maximum size (in bytes) to use in paging for an address. -1
address-settings.redistribution-delay Long How long (in ms) to wait after the last consumer is closed on a queue before redistributing messages. 60000 (1 minute)
initial-wait-timeout String
server-dump-interval Long
connector-services.connector-service
bridges.user
bridges.password
bridges.static-connectors
cluster-connections.static.connectors
message-counter-history-day-limit

A.1.2. hornetq-configuration.xsd Reference

Below is the hornetq-configuration.xsd file that governs the validity of the hornetq-configuration.xml file.
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="urn:hornetq" xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="urn:hornetq" version="1.0">

    <xsd:element name="configuration">
        <xsd:complexType>
            <xsd:all>
                <xsd:element maxOccurs="1" minOccurs="0" name="name" type="xsd:string">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" ref="clustered"/>
                <xsd:element maxOccurs="1" minOccurs="0" ref="file-deployment-enabled"/>    
                <xsd:element maxOccurs="1" minOccurs="0" ref="persistence-enabled"/>    
                <xsd:element maxOccurs="1" minOccurs="0" name="scheduled-thread-pool-max-size" type="xsd:int">
                    <xsd:annotation>
                        <xsd:documentation>
                            Maximum number of threads to use for the scheduled thread pool
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="thread-pool-max-size" type="xsd:int">
                    <xsd:annotation>
                        <xsd:documentation>
                            Maximum number of threads to use for the thread pool
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="security-enabled" type="xsd:boolean">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="security-invalidation-interval" type="xsd:long">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="wild-card-routing-enabled" type="xsd:boolean">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="management-address" type="xsd:string">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="management-notification-address" type="xsd:string">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="cluster-user" type="xsd:string">
                </xsd:element>              
                <xsd:element maxOccurs="1" minOccurs="0" name="cluster-password" type="xsd:string">
                </xsd:element>              
                <xsd:element maxOccurs="1" minOccurs="0" name="log-delegate-factory-class-name" type="xsd:string">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="jmx-management-enabled" type="xsd:boolean">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="jmx-domain" type="xsd:string">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="message-counter-enabled" type="xsd:boolean">
                </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="message-counter-sample-period" type="xsd:long">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="message-counter-max-day-history" type="xsd:int">
            </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="connection-ttl-override" type="xsd:long">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="async-connection-execution-enabled" type="xsd:boolean">
                </xsd:element>              
                <xsd:element maxOccurs="1" minOccurs="0" name="transaction-timeout" type="xsd:long">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="transaction-timeout-scan-period" type="xsd:long">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="message-expiry-scan-period" type="xsd:long">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="message-expiry-thread-priority" type="xsd:int">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="id-cache-size" type="xsd:int">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="persist-id-cache" type="xsd:boolean">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" ref="remoting-interceptors">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="backup" type="xsd:boolean">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="allow-failback" type="xsd:boolean">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="failback-delay" type="xsd:long">
                </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="failover-on-shutdown" type="xsd:boolean">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="shared-store" type="xsd:boolean">
                </xsd:element>          
                <xsd:element maxOccurs="1" minOccurs="0" name="persist-delivery-count-before-delivery" type="xsd:boolean">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="live-connector-ref" type="live-connectorType">
                </xsd:element>              
                <xsd:element maxOccurs="1" minOccurs="0" name="connectors">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element maxOccurs="unbounded" minOccurs="0" name="connector" type="connectorType"/>
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="acceptors">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element maxOccurs="unbounded" minOccurs="1" name="acceptor" type="acceptorType">
                            </xsd:element>
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="broadcast-groups">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element maxOccurs="unbounded" minOccurs="0" ref="broadcast-group">
                            </xsd:element>
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="discovery-groups">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element maxOccurs="unbounded" minOccurs="0" ref="discovery-group">
                            </xsd:element>
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="diverts">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element maxOccurs="unbounded" minOccurs="0" name="divert" type="divertType">
                            </xsd:element>
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="queues">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="bridges">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element maxOccurs="unbounded" minOccurs="0" name="bridge" type="bridgeType">
                            </xsd:element>
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="cluster-connections">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element maxOccurs="unbounded" minOccurs="0" name="cluster-connection" type="clusterConnectionType">
                        </xsd:element>
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="grouping-handler" type="groupingHandlerType">
            </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="paging-directory" type="xsd:string">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="bindings-directory" type="xsd:string">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="create-bindings-dir" type="xsd:boolean">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="journal-directory" type="xsd:string">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="create-journal-dir" type="xsd:boolean">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="journal-type" type="journalType">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="journal-buffer-timeout" type="xsd:long">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="journal-buffer-size" type="xsd:long">
                </xsd:element>              
                <xsd:element maxOccurs="1" minOccurs="0" name="journal-sync-transactional" type="xsd:boolean">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="journal-sync-non-transactional" type="xsd:boolean">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="log-journal-write-rate" type="xsd:boolean">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="journal-file-size" type="xsd:long">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="journal-min-files" type="xsd:int">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="journal-compact-percentage" type="xsd:int">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="journal-compact-min-files" type="xsd:int">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="journal-max-io" type="xsd:int">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="perf-blast-pages" type="xsd:int">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="run-sync-speed-test" type="xsd:boolean">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="server-dump-interval" type="xsd:long">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="memory-warning-threshold" type="xsd:int">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" name="memory-measure-interval" type="xsd:long">
                </xsd:element>              
                <xsd:element maxOccurs="1" minOccurs="0" name="large-messages-directory" type="xsd:string">
                </xsd:element>
             <xsd:element maxOccurs="1" minOccurs="0" name="security-settings">
             </xsd:element>
             <xsd:element maxOccurs="1" minOccurs="0" name="address-settings">
             </xsd:element>
             <xsd:element maxOccurs="1" minOccurs="0" name="connector-services">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element maxOccurs="unbounded" minOccurs="0" name="connector-service" type="connectorServiceType"/>
                        </xsd:sequence>
                    </xsd:complexType>
              </xsd:element>
            </xsd:all>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="clustered" type="xsd:boolean"/>
    
    <xsd:element name="file-deployment-enabled" type="xsd:boolean"/>
    
    <xsd:element name="persistence-enabled" type="xsd:boolean"/>

    <xsd:element name="local-bind-address" type="xsd:string"/>

    <xsd:element name="local-bind-port" type="xsd:int"/>

    <xsd:element name="group-address" type="xsd:string"/>

    <xsd:element name="group-port" type="xsd:int"/>

    <xsd:element name="broadcast-period" type="xsd:long"/>

    <xsd:element name="broadcast-group">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element maxOccurs="1" minOccurs="0" ref="local-bind-address">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" ref="local-bind-port">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="1" ref="group-address">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="1" ref="group-port">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" ref="broadcast-period">
                </xsd:element>
                <xsd:element maxOccurs="unbounded" minOccurs="0" name="connector-ref" type="xsd:string">
                </xsd:element>
            </xsd:sequence>
            <xsd:attribute name="name" type="xsd:ID" use="required"/>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="refresh-timeout" type="xsd:int"/>

    <xsd:element name="initial-wait-timeout" type="xsd:int"/>

    <xsd:element name="discovery-group">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element maxOccurs="1" minOccurs="0" ref="local-bind-address">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="1" ref="group-address">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="1" ref="group-port">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" ref="refresh-timeout">
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="0" ref="initial-wait-timeout">
                </xsd:element>
            </xsd:sequence>
            <xsd:attribute name="name" type="xsd:ID" use="required"/>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="discovery-group-ref">
        <xsd:complexType>
            <xsd:attribute name="discovery-group-name" type="xsd:IDREF">
            </xsd:attribute>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="remoting-interceptors">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element maxOccurs="unbounded" minOccurs="1" name="class-name" type="xsd:string">
                </xsd:element>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>

    <xsd:complexType name="paramType">
        <xsd:attribute name="key" type="xsd:string" use="required"/>
        <xsd:attribute name="value" type="xsd:string" use="required"/>
    </xsd:complexType>

    <xsd:complexType name="connectorType">
        <xsd:sequence>
            <xsd:element maxOccurs="1" minOccurs="1" name="factory-class" type="xsd:string">
            </xsd:element>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="param" type="paramType">
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:ID" use="required"/>
    </xsd:complexType>

    <xsd:complexType name="acceptorType">
        <xsd:sequence>
            <xsd:element maxOccurs="1" minOccurs="1" name="factory-class" type="xsd:string">
            </xsd:element>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="param" type="paramType">
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string" use="optional"/>
    </xsd:complexType>

    <xsd:complexType name="bridgeType">    
        <xsd:sequence>
            <xsd:element maxOccurs="1" minOccurs="1" name="queue-name" type="xsd:IDREF">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="forwarding-address" type="xsd:string">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="ha" type="xsd:boolean">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="filter">
                <xsd:complexType>
                   <xsd:attribute name="string" type="xsd:string" use="required"/>
                </xsd:complexType>
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="transformer-class-name" type="xsd:string">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="retry-interval" type="xsd:long">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="retry-interval-multiplier" type="xsd:double">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="reconnect-attempts" type="xsd:int">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="failover-on-server-shutdown" type="xsd:boolean">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="use-duplicate-detection" type="xsd:boolean">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="confirmation-window-size" type="xsd:int">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="user" type="xsd:string">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="password" type="xsd:string">
            </xsd:element>
            <xsd:choice>                
                <xsd:element maxOccurs="1" minOccurs="1" name="static-connectors">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element maxOccurs="unbounded" minOccurs="1" name="connector-ref" type="xsd:string"/>
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>              
                <xsd:element maxOccurs="1" minOccurs="1" name="discovery-group-ref">
                    <xsd:complexType>
                        <xsd:attribute name="discovery-group-name" type="xsd:IDREF" use="required">
                        </xsd:attribute>
                    </xsd:complexType>
                </xsd:element>
            </xsd:choice>
        </xsd:sequence> 
        <xsd:attribute name="name" type="xsd:string" use="required"/>   
    </xsd:complexType>
    
   <xsd:complexType name="clusterConnectionType">      
        <xsd:sequence>
            <xsd:element maxOccurs="1" minOccurs="1" name="address" type="xsd:string">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="1" name="connector-ref" type="xsd:string">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="retry-interval" type="xsd:long">
            </xsd:element>          
            <xsd:element maxOccurs="1" minOccurs="0" name="use-duplicate-detection" type="xsd:boolean">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="forward-when-no-consumers" type="xsd:boolean">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="max-hops" type="xsd:int">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="confirmation-window-size" type="xsd:int">
            </xsd:element>
            <xsd:choice>
                <xsd:element maxOccurs="1" minOccurs="0" name="static-connectors">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element maxOccurs="unbounded" minOccurs="0" name="connector-ref" type="xsd:string"/>
                        </xsd:sequence>
                        <xsd:attribute name="allow-direct-connections-only" type="xsd:boolean" use="optional"/>
                    </xsd:complexType>
                </xsd:element>  
                <xsd:element maxOccurs="1" minOccurs="0" name="discovery-group-ref">
                    <xsd:complexType>
                        <xsd:attribute name="discovery-group-name" type="xsd:IDREF" use="required">
                        </xsd:attribute>
                    </xsd:complexType>
                </xsd:element>
            </xsd:choice>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string" use="required"/>
    </xsd:complexType>

    <xsd:complexType name="divertType">    
        <xsd:sequence>
            <xsd:element maxOccurs="1" minOccurs="0" name="routing-name" type="xsd:string">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="1" name="address" type="xsd:string">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="1" name="forwarding-address" type="xsd:string">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="filter">
                <xsd:complexType>
                   <xsd:attribute name="string" type="xsd:string" use="required"/>
                </xsd:complexType>
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="transformer-class-name" type="xsd:string">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="exclusive" type="xsd:boolean">
            </xsd:element>
        </xsd:sequence> 
        <xsd:attribute name="name" type="xsd:string" use="required"/>   
    </xsd:complexType>

    <xsd:simpleType name="journalType">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="ASYNCIO"/>
            <xsd:enumeration value="NIO"/>
        </xsd:restriction>
    </xsd:simpleType>

   <xsd:complexType name="groupingHandlerType">
      <xsd:sequence>
         <xsd:element maxOccurs="1" minOccurs="1" name="type" type="groupingHandlerTypeType"/>
         <xsd:element maxOccurs="1" minOccurs="1" name="address" type="xsd:string"/>
         <xsd:element maxOccurs="1" minOccurs="0" name="timeout" type="xsd:int"/>
      </xsd:sequence>
       <xsd:attribute name="name" type="xsd:string" use="required"/>
   </xsd:complexType>

   <xsd:simpleType name="groupingHandlerTypeType">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="LOCAL"/>
         <xsd:enumeration value="REMOTE"/>
      </xsd:restriction>
   </xsd:simpleType>

  <xsd:element name="security-settings">
      <xsd:complexType>
         <xsd:sequence>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="security-setting">
            </xsd:element>
          </xsd:sequence>
       </xsd:complexType>
    </xsd:element>

   <xsd:element name="security-setting">
    <xsd:complexType>
        <xsd:sequence>
           <xsd:element maxOccurs="unbounded" minOccurs="0" name="permission">
              <xsd:complexType>
                 <xsd:attribute name="type" type="xsd:string" use="required"/>
                 <xsd:attribute name="roles" type="xsd:string" use="required"/>
              </xsd:complexType>
           </xsd:element>
        </xsd:sequence>
            <xsd:attribute name="match" type="xsd:string" use="required"/>
        </xsd:complexType>
   </xsd:element>

  <xsd:element name="address-settings">
      <xsd:complexType>
         <xsd:sequence>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="address-setting">
            </xsd:element>
          </xsd:sequence>
       </xsd:complexType>
    </xsd:element>
    
   <xsd:element name="address-setting">
    <xsd:complexType>
      <xsd:all>
        <xsd:element maxOccurs="1" minOccurs="0" name="dead-letter-address" type="xsd:string">
        </xsd:element>
        <xsd:element maxOccurs="1" minOccurs="0" name="expiry-address" type="xsd:string">
        </xsd:element>
        <xsd:element maxOccurs="1" minOccurs="0" name="redelivery-delay" type="xsd:long">
        </xsd:element>
        <xsd:element maxOccurs="1" minOccurs="0" name="max-delivery-attempts" type="xsd:int">
        </xsd:element>
        <xsd:element maxOccurs="1" minOccurs="0" name="max-size-bytes" type="xsd:long">
        </xsd:element>
        <xsd:element maxOccurs="1" minOccurs="0" name="page-size-bytes" type="xsd:long">
        </xsd:element>
        <xsd:element maxOccurs="1" minOccurs="0" name="page-max-cache-size" type="xsd:int">
        </xsd:element>
        <xsd:element maxOccurs="1" minOccurs="0" name="address-full-policy" type="addressFullMessagePolicyType">
        </xsd:element>                
        <xsd:element maxOccurs="1" minOccurs="0" name="message-counter-history-day-limit" type="xsd:int">
        </xsd:element>
        <xsd:element maxOccurs="1" minOccurs="0" name="last-value-queue" type="xsd:boolean">
        </xsd:element>
        <xsd:element maxOccurs="1" minOccurs="0" name="redistribution-delay" type="xsd:long">
        </xsd:element>
        <xsd:element maxOccurs="1" minOccurs="0" name="send-to-dla-on-no-route" type="xsd:boolean">
        </xsd:element>
      </xsd:all>
    <xsd:attribute name="match" type="xsd:string" use="required"/>
   </xsd:complexType> 
   </xsd:element>
     
   <xsd:element name="queues">
      <xsd:complexType>
         <xsd:sequence>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="queue">
            </xsd:element>
         </xsd:sequence>
      </xsd:complexType>
   </xsd:element>
   
   <xsd:element name="queue">
      <xsd:complexType>
        <xsd:all>
            <xsd:element maxOccurs="1" minOccurs="1" name="address" type="xsd:string">
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="filter">
                <xsd:complexType>
                   <xsd:attribute name="string" type="xsd:string" use="required"/>
                </xsd:complexType>
            </xsd:element>
            <xsd:element maxOccurs="1" minOccurs="0" name="durable" type="xsd:boolean">
            </xsd:element>
        </xsd:all>
        <xsd:attribute name="name" type="xsd:ID" use="required"/>
       </xsd:complexType>
    </xsd:element>
    
    <xsd:complexType name="live-connectorType">
        <xsd:attribute name="connector-name" type="xsd:IDREF" use="required">
        </xsd:attribute>
    </xsd:complexType>
    
    <xsd:simpleType name="addressFullMessagePolicyType">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="DROP"/>
            <xsd:enumeration value="PAGE"/>
            <xsd:enumeration value="BLOCK"/>
        </xsd:restriction>
    </xsd:simpleType>
    
    <xsd:complexType name="connectorServiceType">
        <xsd:sequence>
            <xsd:element maxOccurs="1" minOccurs="1" name="factory-class" type="xsd:string">
            </xsd:element>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="param" type="paramType">
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string" use="optional"/>
    </xsd:complexType>

</xsd:schema>

A.1.3. An Example hornetq-configuration.xml

Below is an example configuration file:
<configuration xmlns="urn:hornetq" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
            xsi:schemaLocation="urn:hornetq ../../../../src/schemas/hornetq-configuration.xsd ">

   <security-settings>
      <security-setting match="jms.queue.testQueue">
         <permission type="consume" roles="guest,publisher"/>
         <permission type="send" roles="guest,publisher"/>
      </security-setting>
   </security-settings>

   <address-settings>
      <!--default for catch all-->
      <address-setting match="#">
         <dead-letter-address>jms.queue.DLQ</dead-letter-address>
         <expiry-address>jms.queue.ExpiryQueue</expiry-address>
         <redelivery-delay>0</redelivery-delay>
         <max-size-bytes>-1</max-size-bytes>
         <page-size-bytes>10485760</page-size-bytes>         
         <message-counter-history-day-limit>10</message-counter-history-day-limit>
      </address-setting>
   </address-settings>
   
</configuration>

A.1.4. hornetq-jms.xml

This is the configuration file used by the server side JMS service to load JMS Queues, Topics and Connection Factories. It is located by default in JBOSS_DIST/jboss-as/server/<PROFILE>/deploy/hornetq/hornetq-jms.xml.

Table A.2. JMS Server Configuration

Element Name Type Description Default
connection-factory A list of connection factories to create and add to JNDI.
connection-factory.auto-group Boolean Whether or not message grouping is automatically used. false
connection-factory.connectors String A list of connectors used by the connection factory.
connection-factory.connectors.connector-ref.connector-name (attribute) String Name of the connector to connect to the live server.
connection-factory.connectors.connector-ref. backup-connector-name (attribute) String Name of the connector to connect to the backup server.
connection-factory.discovery-group-ref.discovery-group-name (attribute) String Name of discovery group used by this connection factory.
connection-factory.discovery-initial-wait-timeout Long The initial time to wait (in ms) for discovery groups to wait for broadcasts. 10000
connection-factory.block-on-acknowledge Boolean Whether or not messages are acknowledged synchronously. false
connection-factory.block-on-non-durable-send Boolean Whether or not non-durable messages are sent synchronously. false
connection-factory.block-on-durable-send Boolean Whether or not durable messages are sent synchronously. true
connection-factory.call-timeout Long The timeout (in ms) for remote calls. 30000
connection-factory.client-failure-check-period Long The period (in ms) after which the client will consider the connection failed after not receiving packets from the server. 5000
connection-factory.client-id String The pre-configured client ID for the connection factory. null
connection-factory.connection-load-balancing-policy-class-name String The name of the load balancing class. The default is: org.hornetq.api.core. client.loadbalance. roundRobinConnection LoadBalancingPolicy See description
connection-factory.connection-ttl Long the time to live (in ms) for connections 1 * 60000
connection-factory.consumer-max-rate Integer The fastest rate a consumer may consume messages per second. -1
connection-factory.consumer-window-size Integer The window size (in bytes) for consumer flow control. 1024 * 1024
connection-factory.dups-ok-batch-size Integer The batch size (in bytes) between acknowledgments when using DUPS_OK_ACKNOWLEDGE mode. 1024 * 1024
connection-factory.fail-over-on-initial-connection Boolean Whether or not to fail-over to backup on event that initial connection to live server fails. false
connection-factory.fail-over-on-server-shutdown Boolean Whether or not to fail-over on server shutdown. false
connection-factory.min-large-message-size Integer The size (in bytes) before a message is treated as large. 100 * 1024
connection-factory.cache-large-message-client Boolean If true clients using this connection factory will hold the large message body on temporary files. false
connection-factory.pre-acknowledge Boolean Whether messages are pre acknowledged by the server before sending. false
connection-factory.producer-max-rate Integer The maximum rate of messages per second that can be sent. -1
connection-factory.producer-window-size Integer The window size in bytes for producers sending messages. 1024 * 1024
connection-factory.confirmation-window-size Integer The window size (in bytes) for reattachment confirmations. 1024 * 1024
connection-factory.reconnect-attempts Integer Maximum number of retry attempts, -1 signifies infinite. 0
connection-factory.retry-interval Long The time (in ms) to retry a connection after failing. 2000
connection-factory.retry-interval-multiplier Double Multiplier to apply to successive retry intervals. 1.0
connection-factory.max-retry-interval Integer The maximum retry interval in the case a retry-interval-multiplier has been specified. 2000
connection-factory.scheduled-thread-pool-max-size Integer The size of the scheduled thread pool. 5
connection-factory.thread-pool-max-size Integer The size of the thread pool. -1
connection-factory.transaction-batch-size Integer The batch size (in bytes) between acknowledgments when using a transactional session. 1024 * 1024
connection-factory.use-global-pools Boolean Whether or not to use a global thread pool for threads. true
queue Queue A queue to create and add to JNDI.
queue.name (attribute) String Unique name of the queue.
queue.entry String Context where the queue will be bound in JNDI (there can be many).
queue.durable Boolean Is the queue durable? true
queue.filter String Optional filter expression for the queue.
topic Topic A topic to create and add to JNDI.
topic.name (attribute) String Unique name of the topic.
topic.entry String Context where the topic will be bound in JNDI (there can be many).