JBoss.orgCommunity Documentation

Chapter 49. Configuration Reference

49.1. Server Configuration
49.1.1. hornetq-configuration.xml
49.1.2. hornetq-jms.xml
49.1.3. Using Masked Passwords in Configuration Files

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

This is the main core server configuration file.

Table 49.1. Server Configuration

Element NameElement TypeDescriptionDefault
acceptors Sequence of <acceptor/>a list of remoting acceptors to create 
acceptors.acceptor Complex element  
acceptors.acceptor.name (attribute) xsd:stringName of the acceptor 
acceptors.acceptor.factory-class xsd:stringName of the AcceptorFactory implementation 
acceptors.acceptor.param Complex elementA key-value pair used to configure the acceptor. An acceptor can have many param 
acceptors.acceptor.param.key (required attribute) xsd:stringKey of a configuration parameter 
acceptors.acceptor.param.value (required attribute) xsd:stringValue of a configuration parameter 
address-settings Sequence of <address-setting/>a list of address settings 
address-settings.address-setting Complex element  
address-settings.address-setting.match (required attribute) xsd:stringXXX 
address-settings.address-setting.dead-letter-address xsd:stringthe address to send dead messages to 
address-settings.address-setting.expiry-address xsd:stringthe address to send expired messages to 
address-settings.address-setting.expiry-delay xsd:longOverrides the expiration time for messages using the default value for expiration time. "-1" disables this setting.-1
address-settings.address-setting.redelivery-delay xsd:longthe time (in ms) to wait before redelivering a cancelled message.0
address-settings.address-setting.redelivery-delay-multiplier xsd:doublemultipler to apply to the "redelivery-delay" 
address-settings.address-setting.max-redelivery-delay xsd:longMaximum value for the redelivery-delay 
address-settings.address-setting.max-delivery-attempts xsd:inthow many times to attempt to deliver a message before sending to dead letter address10
address-settings.address-setting.max-size-bytes xsd:longthe maximum size (in bytes) to use in paging for an address (-1 means no limits)-1
address-settings.address-setting.page-size-bytes xsd:longthe page size (in bytes) to use for an address10485760 (10 * 1024 * 1024)
address-settings.address-setting.page-max-cache-size xsd:intNumber of paging files to cache in memory to avoid IO during paging navigation5
address-settings.address-setting.address-full-policy DROP|FAIL|PAGE|BLOCKwhat happens when an address where "max-size-bytes" is specified becomes full 
address-settings.address-setting.message-counter-history-day-limit xsd:inthow many days to keep message counter history for this address0 (days)
address-settings.address-setting.last-value-queue xsd:booleanwhether to treat the queue as a last value queuefalse
address-settings.address-setting.redistribution-delay xsd:longhow long (in ms) to wait after the last consumer is closed on a queue before redistributing messages.-1
address-settings.address-setting.send-to-dla-on-no-route xsd:booleanif there are no queues matching this address, whether to forward message to DLA (if it exists for this address) 
allow-failback xsd:booleanWhether a server will automatically stop when a another places a request to take over its place. The use case is when a regular server stops and its backup takes over its duties, later the main server restarts and requests the server (the former backup) to stop operating.false
async-connection-execution-enabled xsd:booleanShould 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
backup xsd:booleanwhether this server a backup serverfalse
backup-group-name xsd:stringused for replication, if set, (remote) backup servers will only pair with live servers with matching backup-group-name 
bindings-directory xsd:stringthe directory to store the persisted bindings todata/bindings
bridges Sequence of <bridge/>a list of bridges to create 
bridges.bridge Complex element  
bridges.bridge.name (required attribute) xsd:IDunique name for this bridge 
bridges.bridge.queue-name xsd:IDREFname of queue that this bridge consumes from 
bridges.bridge.forwarding-address xsd:stringaddress to forward to. If omitted original address is used 
bridges.bridge.ha xsd:booleanwhether this bridge supports fail-overfalse
bridges.bridge.filter Complex element  
bridges.bridge.filter.string (required attribute) xsd:stringoptional core filter expression 
bridges.bridge.transformer-class-name xsd:stringoptional name of transformer class 
bridges.bridge.min-large-message-size xsd:intAny message larger than this size is considered a large message (to be sent in chunks)102400 (bytes)
bridges.bridge.check-period xsd:longThe period (in milliseconds) a bridge's client will check if it failed to receive a ping from the server. -1 disables this check.30000 (ms)
bridges.bridge.connection-ttl xsd:longhow long to keep a connection alive in the absence of any data arriving from the client60000 (ms)
bridges.bridge.retry-interval xsd:longperiod (in ms) between successive retries2000 (in milliseconds)
bridges.bridge.retry-interval-multiplier xsd:doublemultiplier to apply to successive retry intervals1
bridges.bridge.max-retry-interval xsd:longLimit to the retry-interval growth (due to retry-interval-multiplier) 
bridges.bridge.reconnect-attempts xsd:longmaximum number of retry attempts, -1 means 'no limits'-1
bridges.bridge.failover-on-server-shutdown xsd:booleanshould failover be prompted if target server is cleanly shutdown?false
bridges.bridge.use-duplicate-detection xsd:booleanshould duplicate detection headers be inserted in forwarded messages?true
bridges.bridge.confirmation-window-size xsd:intOnce the bridge has received this many bytes, it sends a confirmation(bytes, 1024 * 1024)
bridges.bridge.user xsd:stringusername, if unspecified the cluster-user is used 
bridges.bridge.password xsd:stringpassword, if unspecified the cluster-password is used 
bridges.bridge.reconnect-attempts-same-node xsd:intUpon reconnection this configures the number of time the same node on the topology will be retried before reseting the server locator and using the initial connectors(int, 10)
broadcast-groups Sequence of <broadcast-group/>a list of broadcast groups to create 
broadcast-groups.broadcast-group Complex element  
broadcast-groups.broadcast-group.name (required attribute) xsd:IDa unique name for the broadcast group 
broadcast-groups.broadcast-group.local-bind-address xsd:stringlocal bind address that the datagram socket is bound towildcard IP address chosen by the kernel
broadcast-groups.broadcast-group.local-bind-port xsd:intlocal port to which the datagram socket is bound to-1 (anonymous port)
broadcast-groups.broadcast-group.group-address xsd:stringmulticast address to which the data will be broadcast 
broadcast-groups.broadcast-group.group-port xsd:intUDP port number used for broadcasting 
broadcast-groups.broadcast-group.broadcast-period xsd:longperiod in milliseconds between consecutive broadcasts2000 (in milliseconds)
broadcast-groups.broadcast-group.jgroups-file xsd:stringName of JGroups configuration file. If specified, the server uses JGroups for broadcasting. 
broadcast-groups.broadcast-group.jgroups-channel xsd:stringName of JGroups Channel. If specified, the server uses the named channel for broadcasting. 
broadcast-groups.broadcast-group.connector-ref xsd:string  
check-for-live-server xsd:booleanWhether to check the cluster for a live server (using our own server ID) when starting up. This option is necessary for performing 'fail-back' on replicating servers. This setting only applies to replicated servers.false
cluster-connections Sequence of <cluster-connection/>a list of cluster connections 
cluster-connections.cluster-connection Complex element  
cluster-connections.cluster-connection.name (required attribute) xsd:IDunique name for this cluster connection 
cluster-connections.cluster-connection.address xsd:stringname of the address this cluster connection applies to 
cluster-connections.cluster-connection.connector-ref xsd:stringName of the connector reference to use. 
cluster-connections.cluster-connection.check-period xsd:longThe period (in milliseconds) used to check if the cluster connection has failed to receive pings from another server30000 (ms)
cluster-connections.cluster-connection.connection-ttl xsd:longhow long to keep a connection alive in the absence of any data arriving from the client60000 (ms)
cluster-connections.cluster-connection.min-large-message-size xsd:intMessages larger than this are considered large-messages(bytes)
cluster-connections.cluster-connection.call-timeout xsd:longHow long to wait for a reply30000 (ms)
cluster-connections.cluster-connection.retry-interval xsd:longperiod (in ms) between successive retries500
cluster-connections.cluster-connection.retry-interval-multiplier xsd:doublemultiplier to apply to the retry-interval 
cluster-connections.cluster-connection.max-retry-interval xsd:longMaximum value for retry-interval2000
cluster-connections.cluster-connection.reconnect-attempts xsd:longHow many attempts should be made to reconnect after failure-1
cluster-connections.cluster-connection.use-duplicate-detection xsd:booleanshould duplicate detection headers be inserted in forwarded messages?true
cluster-connections.cluster-connection.forward-when-no-consumers xsd:booleanshould messages be load balanced if there are no matching consumers on target?false
cluster-connections.cluster-connection.max-hops xsd:intmaximum number of hops cluster topology is propagated1
cluster-connections.cluster-connection.confirmation-window-size xsd:intThe size (in bytes) of the window used for confirming data from the server connected to.1048576
cluster-connections.cluster-connection.call-failover-timeout xsd:longHow long to wait for a reply if in the middle of a fail-over. -1 means wait forever.-1 (ms)
cluster-connections.cluster-connection.notification-interval xsd:longhow often the cluster connection will notify the cluster of its existence right after joining the cluster1000 (ms)
cluster-connections.cluster-connection.notification-attempts xsd:inthow many times this cluster connection will notify the cluster of its existence right after joining the cluster2
clustered xsd:booleanDEPRECATED. This option is deprecated and its value will be ignored (HQ221038). A HornetQ server will be "clustered" when its configuration contain a cluster-configuration.false
cluster-password xsd:stringCluster password. It applies to all cluster configurations.CHANGE ME!!
cluster-user xsd:stringCluster username. It applies to all cluster configurations.HORNETQ.CLUSTER.ADMIN.USER
connection-ttl-override xsd:longif set, this will override how long (in ms) to keep a connection alive without receiving a ping. -1 disables this setting.-1
connectors Sequence of <connector/>a list of remoting connectors configurations to create 
connectors.connector Complex element  
connectors.connector.name (required attribute) xsd:IDName of the connector 
connectors.connector.factory-class xsd:stringName of the ConnectorFactory implementation 
connectors.connector.param Complex elementA key-value pair used to configure the connector. A connector can have many param's 
connectors.connector.param.key (required attribute) xsd:stringKey of a configuration parameter 
connectors.connector.param.value (required attribute) xsd:stringValue of a configuration parameter 
connector-services Sequence of <connector-service/>  
connector-services.connector-service Complex element  
connector-services.connector-service.name (attribute) xsd:stringname of the connector service 
connector-services.connector-service.factory-class xsd:stringName of the factory class of the ConnectorService 
connector-services.connector-service.param Complex element  
connector-services.connector-service.param.key (required attribute) xsd:stringKey of a configuration parameter 
connector-services.connector-service.param.value (required attribute) xsd:stringValue of a configuration parameter 
create-bindings-dir xsd:booleantrue means that the server will create the bindings directory on start uptrue
create-journal-dir xsd:booleantrue means that the journal directory will be createdtrue
discovery-groups Sequence of <discovery-group/>a list of discovery groups to create 
discovery-groups.discovery-group Complex element  
discovery-groups.discovery-group.name (required attribute) xsd:IDa unique name for the discovery group 
discovery-groups.discovery-group.group-address xsd:stringMulticast IP address of the group to listen on 
discovery-groups.discovery-group.group-port xsd:intUDP port number of the multi cast group 
discovery-groups.discovery-group.jgroups-file xsd:stringName of a JGroups configuration file. If specified, the server uses JGroups for discovery. 
discovery-groups.discovery-group.jgroups-channel xsd:stringName of a JGroups Channel. If specified, the server uses the named channel for discovery. 
discovery-groups.discovery-group.refresh-timeout xsd:intPeriod the discovery group waits after receiving the last broadcast from a particular server before removing that servers connector pair entry from its list.5000 (in milliseconds)
discovery-groups.discovery-group.local-bind-address xsd:stringlocal bind address that the datagram socket is bound towildcard IP address chosen by the kernel
discovery-groups.discovery-group.local-bind-port xsd:intlocal port to which the datagram socket is bound to-1 (anonymous port)
discovery-groups.discovery-group.initial-wait-timeout xsd:inttime to wait for an initial broadcast to give us at least one node in the cluster10000 (milliseconds)
diverts Sequence of <divert/>a list of diverts to use 
diverts.divert Complex element  
diverts.divert.name (required attribute) xsd:IDa unique name for the divert 
diverts.divert.transformer-class-name xsd:stringan optional class name of a transformer 
diverts.divert.exclusive xsd:booleanwhether this is an exclusive divertfalse
diverts.divert.routing-name xsd:stringthe routing name for the divert 
diverts.divert.address xsd:stringthe address this divert will divert from 
diverts.divert.forwarding-address xsd:stringthe forwarding address for the divert 
diverts.divert.filter Complex element  
diverts.divert.filter.string (required attribute) xsd:stringoptional core filter expression 
failback-delay xsd:longdelay to wait before fail-back occurs on (live's) restart5000 (in milliseconds)
failover-on-shutdown xsd:booleanWill this backup server come live on a normal server shutdownfalse
file-deployment-enabled xsd:booleantrue means that the server will load configuration from the configuration filestrue
grouping-handler Complex elementMessage Group configuration 
grouping-handler.name (required attribute) xsd:stringA name identifying this grouping-handler 
grouping-handler.type LOCAL|REMOTEEach cluster should choose 1 node to have a LOCAL grouping handler and all the other nodes should have REMOTE handlers 
grouping-handler.address xsd:stringA reference to a cluster connection address 
grouping-handler.timeout xsd:intHow long to wait for a decision5000 (ms)
id-cache-size xsd:intthe size of the cache for pre-creating message id's2000
jmx-domain xsd:stringthe JMX domain used to registered HornetQ MBeans in the MBeanServerorg.hornetq
jmx-management-enabled xsd:booleantrue means that the management API is available via JMXtrue
journal-buffer-size xsd:longThe size of the internal buffer on the journal in KiB.501760 (490 KiB)
journal-buffer-timeout xsd:longThe timeout (in nanoseconds) used to flush internal buffers on the journal. The exact default value depend on whether the journal is ASYNCIO or NIO. 
journal-compact-min-files xsd:intThe minimal number of data files before we can start compacting10
journal-compact-percentage xsd:intThe percentage of live data on which we consider compacting the journal30
journal-directory xsd:stringthe directory to store the journal files indata/journal
journal-file-size xsd:longthe size (in bytes) of each journal file10485760 (10 * 1024 * 1024 - 10 MiB)
journal-max-io xsd:intthe maximum number of write requests that can be in the AIO queue at any one time. Default is 500 for AIO and 1 for NIO. 
journal-min-files xsd:inthow many journal files to pre-create2
journal-sync-non-transactional xsd:booleanif true wait for non transaction data to be synced to the journal before returning response to client.true
journal-sync-transactional xsd:booleanif true wait for transaction data to be synchronized to the journal before returning response to clienttrue
journal-type ASYNCIO|NIOthe type of journal to useASYNCIO
large-messages-directory xsd:stringthe directory to store large messagesdata/largemessages
log-delegate-factory-class-name xsd:stringXXX 
log-journal-write-rate xsd:booleanWhether to log messages about the journal write ratefalse
management-address xsd:stringthe name of the management address to send management messages tojms.queue.hornetq.management
management-notification-address xsd:stringthe name of the address that consumers bind to receive management notificationshornetq.notifications
mask-password xsd:booleanThis option controls whether passwords in server configuration need be masked. If set to "true" the passwords are masked.false
memory-measure-interval xsd:longfrequency to sample JVM memory in ms (or -1 to disable memory sampling)-1 (ms)
memory-warning-threshold xsd:intPercentage of available memory which will trigger a warning log25
message-counter-enabled xsd:booleantrue means that message counters are enabledfalse
message-counter-max-day-history xsd:inthow many days to keep message counter history10 (days)
message-counter-sample-period xsd:longthe sample period (in ms) to use for message counters10000
message-expiry-scan-period xsd:longhow often (in ms) to scan for expired messages30000
message-expiry-thread-priority xsd:intthe priority of the thread expiring messages3
name xsd:stringNode name. If set, it will be used in topology notifications. 
page-max-concurrent-io xsd:intThe max number of concurrent reads allowed on paging5
paging-directory xsd:stringthe directory to store paged messages indata/paging
password-codec xsd:stringClass name and its parameters for the Decoder used to decode the masked password. Ignored if mask-password is false. The format of this property is a full qualified class name optionally followed by key/value pairs.org.hornetq.utils.DefaultSensitiveStringCodec
perf-blast-pages xsd:intXXX Only meant to be used by project developers-1
persist-delivery-count-before-delivery xsd:booleanTrue means that the delivery count is persisted before delivery. False means that this only happens after a message has been cancelled.false
persistence-enabled xsd:booleantrue means that the server will use the file based journal for persistence.true
persist-id-cache xsd:booleantrue means that id's are persisted to the journaltrue
queues Sequence of <queue/>a list of pre configured queues to create 
queues.queue Complex element  
queues.queue.name (required attribute) xsd:IDunique name of this queue 
queues.queue.address xsd:stringaddress for the queue 
queues.queue.filter Complex element  
queues.queue.filter.string (required attribute) xsd:stringoptional core filter expression 
queues.queue.durable xsd:booleanwhether the queue is durable (persistent)true
remoting-incoming-interceptors Complex elementa list of <class-name/> elements with the names of classes to use for interceptor incoming remoting packetsunlimited sequence of <class-name/> 
remoting-incoming-interceptors.class-name xsd:stringthe fully qualified name of the interceptor class 
remoting-interceptors Complex elementDEPRECATED. This option is deprecated, but it will still be honored. Any interceptor specified here will be considered an "incoming" interceptor. See <remoting-incoming-interceptors> and <remoting-outgoing-interceptors>.unlimited sequence of <class-name/> 
remoting-interceptors.class-name xsd:stringthe fully qualified name of the interceptor class 
remoting-outgoing-interceptors Complex elementa list of <class-name/> elements with the names of classes to use for interceptor outcoming remoting packetsunlimited sequence of <class-name/> 
remoting-outgoing-interceptors.class-name xsd:stringthe fully qualified name of the interceptor class 
replication-clustername xsd:stringName of the cluster configuration to use for replication. This setting is only necessary in case you configure multiple cluster connections. It is used by a replicating backups and by live servers that may attempt fail-back. 
run-sync-speed-test xsd:booleanXXX Only meant to be used by project developersfalse
scheduled-thread-pool-max-size xsd:intMaximum number of threads to use for the scheduled thread pool5
security-enabled xsd:booleantrue means that security is enabledtrue
security-invalidation-interval xsd:longhow long (in ms) to wait before invalidating the security cache10000
security-settings Sequence of <security-setting/>a list of security settings 
security-settings.security-setting Sequence of <permission/>  
security-settings.security-setting.match (required attribute) xsd:stringregular expression for matching security roles against addresses 
security-settings.security-setting.permission Complex element  
security-settings.security-setting.permission.type (required attribute) xsd:stringthe type of permission 
security-settings.security-setting.permission.roles (required attribute) xsd:stringa comma-separated list of roles to apply the permission to 
server-dump-interval xsd:longInterval to log server specific information (e.g. memory usage etc)-1 (ms)
shared-store xsd:boolean'shared-store' applies to live and backup pairs, and it indicates if the live/backup pair share storage or if the data is replicated among them.true
thread-pool-max-size xsd:intMaximum number of threads to use for the thread pool. -1 means 'no limits'.-1
transaction-timeout xsd:longhow long (in ms) before a transaction can be removed from the resource manager after create time300000
transaction-timeout-scan-period xsd:longhow often (in ms) to scan for timeout transactions1000
wild-card-routing-enabled xsd:booleantrue means that the server supports wild card routingtrue

This is the configuration file used by the server side JMS service to load JMS Queues, Topics and Connection Factories.


Continued..

connection-factory.signature (attribute) StringType of connection factorygeneric
connection-factory.xa BooleanIf it is a XA connection factoryfalse
connection-factory.auto-group Booleanwhether or not message grouping is automatically usedfalse
connection-factory.connectors StringA list of connectors used by the connection factory 
connection-factory.connectors.connector-ref.connector-name (attribute) StringName of the connector to connect to the live server 
connection-factory.discovery-group-ref.discovery-group-name (attribute) StringName of discovery group used by this connection factory 
connection-factory.discovery-initial-wait-timeout Longthe initial time to wait (in ms) for discovery groups to wait for broadcasts10000
connection-factory.block-on-acknowledge Booleanwhether or not messages are acknowledged synchronouslyfalse
connection-factory.block-on-non-durable-send Booleanwhether or not non-durable messages are sent synchronouslyfalse
connection-factory.block-on-durable-send Booleanwhether or not durable messages are sent synchronouslytrue
connection-factory.call-timeoutLongthe timeout (in ms) for remote calls30000
connection-factory.client-failure-check-period Longthe period (in ms) after which the client will consider the connection failed after not receiving packets from the server30000
connection-factory.client-id Stringthe pre-configured client ID for the connection factorynull
connection-factory.connection-load-balancing-policy-class-name Stringthe name of the load balancing classorg.hornetq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy
connection-factory.connection-ttl Longthe time to live (in ms) for connections1 * 60000
connection-factory.consumer-max-rateIntegerthe fastest rate a consumer may consume messages per second-1
connection-factory.consumer-window-sizeIntegerthe window size (in bytes) for consumer flow control1024 * 1024
connection-factory.dups-ok-batch-sizeIntegerthe batch size (in bytes) between acknowledgements when using DUPS_OK_ACKNOWLEDGE mode1024 * 1024
connection-factory.failover-on-initial-connectionBooleanwhether or not to failover to backup on event that initial connection to live server failsfalse
connection-factory.failover-on-server-shutdownBooleanwhether or not to failover on server shutdownfalse
connection-factory.min-large-message-sizeIntegerthe size (in bytes) before a message is treated as large100 * 1024
connection-factory.avoid-large-messagesBooleanIf compress large messages and send them as regular messages if possiblefalse
connection-factory.cache-large-message-clientBooleanIf true clients using this connection factory will hold the large message body on temporary files.false
connection-factory.pre-acknowledgeBooleanwhether messages are pre acknowledged by the server before sendingfalse
connection-factory.producer-max-rateIntegerthe maximum rate of messages per second that can be sent-1
connection-factory.producer-window-sizeIntegerthe window size in bytes for producers sending messages1024 * 1024
connection-factory.confirmation-window-size Integerthe window size (in bytes) for reattachment confirmations1024 * 1024
connection-factory.reconnect-attempts Integermaximum number of retry attempts, -1 signifies infinite0
connection-factory.retry-interval Longthe time (in ms) to retry a connection after failing2000
connection-factory.retry-interval-multiplier Doublemultiplier to apply to successive retry intervals1.0
connection-factory.max-retry-intervalIntegerThe maximum retry interval in the case a retry-interval-multiplier has been specified2000
connection-factory.scheduled-thread-pool-max-size Integerthe size of the scheduled thread pool5
connection-factory.thread-pool-max-size Integerthe size of the thread pool-1
connection-factory.transaction-batch-size Integerthe batch size (in bytes) between acknowledgements when using a transactional session1024 * 1024
connection-factory.use-global-pools Booleanwhether or not to use a global thread pool for threadstrue
queueQueuea queue to create and add to JNDI 
queue.name (attribute)Stringunique name of the queue 
queue.entryStringcontext where the queue will be bound in JNDI (there can be many) 
queue.durableBooleanis the queue durable?true
queue.filterStringoptional filter expression for the queue 
topicTopica topic to create and add to JNDI 
topic.name (attribute)Stringunique name of the topic 
topic.entryStringcontext where the topic will be bound in JNDI (there can be many) 

By default all passwords in HornetQ server's configuration files are in plain text form. This usually poses no security issues as those files should be well protected from unauthorized accessing. However, in some circumstances a user doesn't want to expose its passwords to more eyes than necessary.

HornetQ can be configured to use 'masked' passwords in its configuration files. A masked password is an obscure string representation of a real password. To mask a password a user will use an 'encoder'. The encoder takes in the real password and outputs the masked version. A user can then replace the real password in the configuration files with the new masked password. When HornetQ loads a masked password, it uses a suitable 'decoder' to decode it into real password.

Hornetq provides a default password encoder and decoder. Optionally users can use or implement their own encoder and decoder for masking the passwords.

As described in the previous sections, all password masking requires a decoder. A decoder uses an algorithm to convert a masked password into its original clear text form in order to be used in various security operations. The algorithm used for decoding must match that for encoding. Otherwise the decoding may not be successful.

For user's convenience HornetQ provides a default built-in Decoder. However a user can if they so wish implement their own.