This section is a quick index for looking up configuration. Click on the element name to go to the specific chapter.
1. Broker Configuration
1.1. broker.xml
This is the main core server configuration file which contains the core
element.
The core
element contains the main server configuration.
1.1.1. Modularising broker.xml
XML XInclude support is provided in broker.xml
so that you can break your configuration out into separate files.
To do this ensure the following is defined at the root configuration element.
xmlns:xi="http://www.w3.org/2001/XInclude"
You can now define include tag’s where you want to bring in xml configuration from another file:
<xi:include href="my-address-settings.xml"/>
You should ensure xml elements in separated files should be namespaced correctly for example if address-settings element was separated, it should have the element namespace defined:
<address-settings xmlns="urn:activemq:core">
An example can of this feature can be seen in the test suites:
./artemis-server/src/test/resources/ConfigurationTest-xinclude-config.xml
if you use xmllint to validate the XML against the schema you should enable xinclude flag when running.
|
--xinclude
For further information on XInclude see: https://www.w3.org/TR/xinclude/
To disable XML external entity processing use the system property artemis.disableXxe
, e.g.:
-Dartemis.disableXxe=true
Reloading modular configuration files
Certain changes in broker.xml
can be picked up at runtime as discussed in the Configuration Reload chapter.
Changes made directly to files which are included in broker.xml
via xi:include
will not be automatically reloaded.
For example, if broker.xml
is including my-address-settings.xml
and my-address-settings.xml
is modified those changes won’t be reloaded automatically.
To force a reload in this situation there are 2 main options:
-
Use the
reloadConfiguration
management operation on theActiveMQServerControl
. -
Update the timestamp on
broker.xml
using something like the touch command. The next time the broker inspectsbroker.xml
for automatic reload it will see the updated timestamp and trigger a reload ofbroker.xml
and all its included files.
1.2. System properties
It is possible to use System properties to replace some of the configuration properties. If you define a System property starting with "brokerconfig." that will be passed along to Bean Utils and the configuration would be replaced.
To define global-max-size=1000000 using a system property you would have to define this property, for example through java arguments:
java -Dbrokerconfig.globalMaxSize=1000000
You can also change the prefix through the broker.xml
by setting:
<system-property-prefix>yourprefix</system-property-prefix>
This is to help you customize artemis on embedded systems.
1.3. Broker properties
Broker properties extends the use of properties to allow updates and additions to the broker configuration after any xml has been parsed. In the absence of any broker.xml, the hard coded defaults can be modified. Internally, any xml configuration is applied to a java bean style configuration object. Typically, there are setters for each of the xml attributes. However, for properties, the naming convention changes from 'a-b' to 'aB' to reflect the camelCase java naming convention.
Collections need some special treatment to allow additions and reference. We utilise the name attribute of configuration entities to find existing entries and when populating new entities, we set the name to match the requested key. Removal of configuration from named collections is supported by setting a key value to "-". The remove match value can be configured with a property key "remove.value".
For example, a properties file containing:
securityEnabled=false acceptorConfigurations.tcp.factoryClassName=org.apache.activemq.artemis.core.remoting.impl.netty.NettyAcceptorFactory acceptorConfigurations.tcp.params.host=localhost acceptorConfigurations.tcp.params.port=61616
would: 1) disable RBAC security checks 2) add or modify an acceptor named "tcp" that will use Netty 3) set the acceptor named "tcp" 'HOST' parameter to localhost 4) set the acceptor named "tcp" 'PORT' parameter to 61616
The configuration properties are low level, lower level than xml, however it is very powerful;
any accessible attribute of the internal org.apache.activemq.artemis.core.config.impl.ConfigurationImpl
objects can be modified.
With great power one must take great care!
The artemis run
command script supports --properties <properties file url>
, where a properties file can be configured.
one shortcoming of this method of configuration is that any property that does not match is ignored with no fanfare.
Enable debug logging for org.apache.activemq.artemis.core.config.impl.ConfigurationImpl to get more insight.
|
There are a growing number of examples of what can be explicitly configured in this way in the unit test.
2. The core configuration
This describes the root of the XML configuration. You will see here also multiple sub-types listed. For example on the main config you will have bridges and at the list of bridge type we will describe the properties for that configuration.
The default values listed below are the values which will be used if the configuration parameter is not set either programmatically or via |
Name | Description | Default |
---|---|---|
a list of remoting acceptors |
n/a |
|
Each acceptor is composed for just an URL |
n/a |
|
n/a |
||
n/a |
||
Should stop backup on primary restart. |
|
|
If true uses CORE queue naming convention for AMQP. |
|
|
If False delivery would be always asynchronous. |
|
|
The folder in use for the bindings folder |
|
|
n/a |
||
the HA policy of this server |
none |
|
n/a |
||
n/a |
||
n/a |
||
The frequency in milliseconds the configuration file is checked for changes |
5000 |
|
Used by a primary server to verify if there are other nodes with the same ID on the topology |
n/a |
|
n/a |
||
Cluster password. It applies to all cluster configurations. |
n/a |
|
Cluster username. It applies to all cluster configurations. |
n/a |
|
if set, this will override how long (in ms) to keep a connection alive without receiving a ping. -1 disables this setting. |
-1 |
|
how often (in ms) to check connections for ttl violation. |
2000 |
|
The URL for the connector. This is a list |
n/a |
|
true means that the server will create the bindings directory on start up. |
|
|
true means that the journal directory will be created. |
|
|
n/a |
||
The interval where the disk is scanned for percentual usage. |
5000 |
|
n/a |
||
The amount in bytes before all addresses are considered full. |
Half of the JVM’s |
|
Number of messages before all addresses will enter into their Full Policy configured. It works in conjunction with global-max-size, being watever value hits its maximum first. |
|
|
true means that graceful shutdown is enabled. |
|
|
Timeout on waiting for clients to disconnect before server shutdown. |
-1 |
|
n/a |
||
The duplicate detection circular cache size. |
20000 |
|
the JMX domain used to registered MBeans in the MBeanServer. |
|
|
whether or not to use the broker name in the JMX properties. |
|
|
true means that the management API is available via JMX. |
|
|
The size of the internal buffer on the journal in KB. |
490KB |
|
The Flush timeout for the journal buffer |
500000 for ASYNCIO; 3333333 for NIO |
|
The minimal number of data files before we can start compacting. Setting this to 0 means compacting is disabled. |
10 |
|
The percentage of live data on which we consider compacting the journal. |
30 |
|
the directory to store the journal files in. |
|
|
the directory to store the node manager lock file. |
same of |
|
the size (in bytes) of each journal file. |
10MB |
|
how long (in ms) to wait to acquire a file lock on the journal. |
-1 |
|
the maximum number of write requests that can be in the ASYNCIO queue at any one time. |
4096 for ASYNCIO; 1 for NIO; ignored for MAPPED |
|
the length of time in seconds to wait when opening a new journal file before timing out and failing. |
5 |
|
how many journal files to pre-create. |
2 |
|
The upper threshold of the journal file pool, -1 means no Limit.
The system will create as many files as needed however when reclaiming files it will shrink back to the |
-1 |
|
if true wait for non transaction data to be synced to the journal before returning response to client. |
|
|
if true wait for transaction data to be synchronized to the journal before returning response to client. |
|
|
the type of journal to use. |
|
|
where to keep retained data including attributes for how long to keep it ( |
n/a |
|
It will use msync/fsync on journal operations. |
|
|
journal-device-block-size |
The size in bytes used by the storage device. This is usually translated as |
|
log-journal-write-rate |
Whether to log messages about the journal write rate. |
|
the directory to store large messages. |
|
|
should sync large messages before closing the file |
|
|
log-delegate-factory-class-name |
deprecated the name of the factory class to use for log delegation. |
n/a |
the name of the management address to send management messages to. |
|
|
the name of the address that consumers bind to receive management notifications. |
|
|
This option controls whether passwords in server configuration need be masked. If set to "true" the passwords are masked. |
|
|
This specifies how many replication backup directories will be kept when server starts as replica. -1 Means no Limit; 0 don’t keep a copy at all. |
2 |
|
The max percentage of data we should use from disks.
The broker will block while the disk is full.
Disable by setting |
90 |
|
Min free bytes on disk below which the system blocks or fails clients.
Supports byte notation like "K", "MB", "GB", etc.
Will override |
|
|
frequency to sample JVM memory in ms (or -1 to disable memory sampling). |
-1 |
|
Percentage of available memory which will trigger a warning log. |
25 |
|
true means that message counters are enabled. |
|
|
how many days to keep message counter history. |
10 |
|
the sample period (in ms) to use for message counters. |
10000 |
|
how often (in ms) to scan for expired messages. |
30000 |
|
deprecated the priority of the thread expiring messages. |
3 |
|
n/a |
||
how often (in ms) to scan for addresses & queues that should be removed. |
30000 |
|
name |
node name; used in topology notifications if set. |
n/a |
the name of the class (and optional configuration properties) used to decode masked passwords.
Only valid when |
n/a |
|
The max number of concurrent reads allowed on paging. |
5 |
|
The time in nanoseconds a page will be synced. |
3333333 for ASYNCIO;
|
|
If true the whole page would be read, otherwise just seek and read while getting message. |
|
|
the directory to store paged messages in. |
|
|
True means that the delivery count is persisted before delivery. False means that this only happens after a message has been cancelled. |
|
|
Maximum number of records the system will store for redeliveries. In most cases this should be set to '1'. |
|
|
true means that the server will use the file based journal for persistence. |
|
|
true means that ID’s are persisted to the journal. |
|
|
queues |
deprecated use addresses |
n/a |
a list of <class-name/> elements with the names of classes to use for intercepting incoming remoting packets |
n/a |
|
a list of <class-name/> elements with the names of classes to use for intercepting outgoing remoting packets |
n/a |
|
resolveProtocols |
Use ServiceLoader to load protocol modules. |
|
n/a |
||
Maximum number of threads to use for the scheduled thread pool. |
5 |
|
true means that security is enabled. |
|
|
how long (in ms) to wait before invalidating the security cache. |
10000 |
|
how large to make the authentication cache |
1000 |
|
how large to make the authorization cache |
1000 |
|
system-property-prefix |
Prefix for replacing configuration settings using Bean Utils. |
n/a |
internal-naming-prefix |
the prefix used when naming the internal queues and addresses required for implementing certain behaviours. |
|
whether or not to add the name of the validated user to the messages that user sends. |
|
|
true means that the server will not allow any message that doesn’t have a validated user, in JMS this is |
|
|
n/a |
||
Maximum number of threads to use for the thread pool. -1 means 'no limits'. |
30 |
|
how long (in ms) before a transaction can be removed from the resource manager after create time. |
300000 |
|
how often (in ms) to scan for timeout transactions. |
1000 |
|
true means that the server supports wild card routing. |
|
|
the NIC (Network Interface Controller) to be used on InetAddress.isReachable. |
n/a |
|
the list of http URIs to be used to validate the network. |
n/a |
|
the list of pings to be used on ping or InetAddress.isReachable. |
n/a |
|
a frequency in milliseconds to how often we should check if the network is still up. |
10000 |
|
a timeout used in milliseconds to be used on the ping. |
1000 |
|
the command used to oping IPV4 addresses. |
n/a |
|
the command used to oping IPV6 addresses. |
n/a |
|
enable or disable the critical analysis. |
|
|
timeout used to do the critical analysis. |
120000 ms |
|
time used to check the response times. |
0.5 * |
|
should the server log, be halted or shutdown upon failures. |
|
|
resolve-protocols |
if true then the broker will make use of any protocol managers that are in available on the classpath, otherwise only the core protocol will be available, unless in embedded mode where users can inject their own protocol managers. |
|
n/a |
||
server-dump-interval |
interval to log server specific information (e.g. memory usage etc). |
-1 |
store |
the store type used by the server. |
n/a |
parameters to configure wildcard address matching format. |
n/a |
|
parameter to configure the regular expression pattern to match management or JMX operations that require the 'view' permission in your security-settings. |
|
|
parameter to enable security-settings RBAC on management messages sent to the management address. |
false |
|
parameter to configure the prefix for security-settings match addresses to control RBAC on JMX MBean operations and optionally on management messages |
mops (shorthand for management operations) |
|
the namespace to use for looking up address settings for temporary queues |
n/a |
|
how often (in ms) to scan for expired MQTT sessions |
|
|
how long (in ms) to wait to persist MQTT session state |
|
|
a list of federation elements |
n/a |
|
a list of connection-router elements |
n/a |
|
mirror-ack-manager-queue-attempts |
The number of times a mirror target would retry an acknowledgement on the queue before scanning page files for the message. |
|
mirror-ack-manager-page-attempts |
The number of times a mirror target would retry an acknowledgement on paging. |
|
mirror-ack-manager-retry-delay |
Period in milliseconds for which retries are going to be exercised. |
|
mirror-page-transaction |
Should Mirror use Page Transactions When target destinations is paging?
When a target queue on the mirror is paged, the mirror will not record a page transaction for every message.
The default is |
|
Whether to suppress |
|
|
The characters that mark a "literal" match. A literal match means the setting(s) will only apply to the exact match regardless of wildcards. If this setting is not omitted then it must be two characters - the start marker and the end marker. |
n/a |
3. address-setting type
Name | Description | Default |
---|---|---|
The filter to apply to the setting |
n/a |
|
Dead letter address |
n/a |
|
Whether or not to auto-create dead-letter address and/or queue |
|
|
Prefix to use for auto-created dead-letter queues |
|
|
Suffix to use for auto-created dead-letter queues |
`` (empty) |
|
Expired messages address |
n/a |
|
Expiration time override; -1 don’t override |
-1 |
|
Time to wait before redelivering a message |
0 |
|
Multiplier to apply to the |
1.0 |
|
an additional factor used to calculate an adjustment to the |
0.0 |
|
Max value for the |
10 * |
|
Number of retries before dead letter address |
10 |
|
Max size a queue can be before invoking |
-1 |
|
Used with |
-1 |
|
Size of each file on page |
10485760 |
|
What to do when a queue reaches |
|
|
Days to keep message counter data |
0 |
|
deprecated Queue is a last value queue;
see |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 |
|
|
-1 |
|
Timeout before redistributing values after no consumers |
-1 |
|
Forward messages to DLA when no queues subscribing |
|
|
Min rate of msgs/sec consumed before a consumer is considered "slow" |
-1 |
|
What to do when "slow" consumer is detected |
|
|
How often to check for "slow" consumers |
5 |
|
deprecated Create JMS queues automatically;
see |
|
|
deprecated Delete JMS queues automatically;
see |
|
|
deprecated Create JMS topics automatically;
see |
|
|
deprecated Delete JMS topics automatically;
see |
|
|
Create queues automatically |
|
|
Delete auto-created queues automatically |
|
|
Delete created queues automatically |
|
|
Delay for deleting auto-created queues |
0 |
|
Message count the queue must be at or below before it can be auto deleted |
0 |
|
How to deal with queues deleted from XML at runtime |
|
|
Create addresses automatically |
|
|
Delete auto-created addresses automatically |
|
|
Delay for deleting auto-created addresses |
0 |
|
How to deal with addresses deleted from XML at runtime |
|
|
How to deal with diverts deleted from XML at runtime |
|
|
Number of messages a management resource can browse |
200 |
|
The number of elements in the intermediate message buffer allocated for each queue |
8192 |
|
|
|
|
|
-1 |
|
Routing type for auto-created queues if the type can’t be otherwise determined |
|
|
Routing type for auto-created addresses if the type can’t be otherwise determined |
|
|
The ring-size applied to queues without an explicit |
|
|
the number of messages to preserve for future queues created on the matching address |
|
|
The duplicate detection circular cache size |
Inherits from global |
4. bridge type
Name | Description | Default |
---|---|---|
unique name |
n/a |
|
name of queue that this bridge consumes from |
n/a |
|
address to forward to. If omitted original address is used |
n/a |
|
whether this bridge supports fail-over |
|
|
optional core filter expression |
n/a |
|
optional name of transformer class |
n/a |
|
Limit before message is considered large. |
100KB |
|
How often to check for TTL violation. -1 means disabled. |
30000 |
|
TTL for the Bridge. This should be greater than the ping period. |
60000 |
|
period (in ms) between successive retries. |
2000 |
|
multiplier to apply to successive retry intervals. |
1 |
|
Limit to the retry-interval growth. |
2000 |
|
maximum number of retry attempts. |
-1 (no limit) |
|
forward duplicate detection headers? |
|
|
number of bytes before confirmations are sent. |
1MB |
|
Producer flow control size on the bridge. |
-1 (disabled) |
|
Username for the bridge, the default is the cluster username. |
n/a |
|
Password for the bridge, default is the cluster password. |
n/a |
|
Number of retries before trying another node. |
10 |
|
how to set the routing-type on the bridged message |
|
|
Concurrency of the bridge |
1 |
5. broadcast-group type
Name | Type |
---|---|
unique name |
|
Local bind address that the datagram socket is bound to. |
|
Local port to which the datagram socket is bound to. |
|
Multicast address to which the data will be broadcast. |
|
UDP port number used for broadcasting. |
|
Period in milliseconds between consecutive broadcasts. Default=2000. |
|
Name of JGroups configuration file. |
|
Name of JGroups Channel. |
|
The |
6. cluster-connection type
Name | Description | Default |
---|---|---|
unique name |
n/a |
|
name of the address this cluster connection applies to |
n/a |
|
Name of the connector reference to use. |
n/a |
|
The period (in milliseconds) used to check if the cluster connection has failed to receive pings from another server |
30000 |
|
Timeout for TTL. |
60000 |
|
Messages larger than this are considered large-messages. |
100KB |
|
Time(ms) before giving up on blocked calls. |
30000 |
|
period (in ms) between successive retries. |
500 |
|
multiplier to apply to the retry-interval. |
1 |
|
Maximum value for retry-interval. |
2000 |
|
How many attempts should be made to reconnect after failure. |
-1 |
|
should duplicate detection headers be inserted in forwarded messages? |
|
|
how should messages be load balanced? |
|
|
maximum number of hops cluster topology is propagated. |
1 |
|
The size (in bytes) of the window used for confirming data from the server connected to. |
1048576 |
|
Flow Control for the Cluster connection bridge. |
-1 (disabled) |
|
How long to wait for a reply if in the middle of a fail-over. -1 means wait forever. |
-1 |
|
how often the cluster connection will notify the cluster of its existence right after joining the cluster. |
1000 |
|
how many times this cluster connection will notify the cluster of its existence right after joining the cluster |
2 |
7. discovery-group type
Name | Description |
---|---|
unique name |
|
Multicast IP address of the group to listen on |
|
UDP port number of the multi cast group |
|
Name of a JGroups configuration file. If specified, the server uses JGroups for discovery. |
|
Name of a JGroups Channel. If specified, the server uses the named channel for discovery. |
|
Period the discovery group waits after receiving the last broadcast from a particular server before removing that servers connector pair entry from its list. Default=10000 |
|
local bind address that the datagram socket is bound to |
|
local port to which the datagram socket is bound to. Default=-1 |
|
initial-wait-timeout |
time to wait for an initial broadcast to give us at least one node in the cluster. Default=10000 |
8. divert type
Name | Description |
---|---|
unique name |
|
an optional class name of a transformer |
|
whether this is an exclusive divert. Default=false |
|
the routing name for the divert |
|
the address this divert will divert from |
|
the forwarding address for the divert |
|
optional core filter expression |
|
how to set the routing-type on the diverted message.
Default= |
10. queue type
Name | Description | Default |
---|---|---|
name |
unique name |
n/a |
filter |
optional core filter expression |
n/a |
durable |
whether the queue is durable (persistent). |
|
user |
the name of the user to associate with the creation of the queue |
n/a |
the max number of consumers allowed on this queue |
-1 (no max) |
|
whether or not to delete all messages and prevent routing when no consumers are connected |
|
|
only deliver messages to one of the connected consumers |
|
|
use last-value semantics |
|
|
the size this queue should maintain according to ring semantics |
based on |
|
consumers-before-dispatch |
number of consumers required before dispatching messages |
0 |
delay-before-dispatch |
milliseconds to wait for |
-1 (wait forever) |
11. security-setting type
Name | Description |
---|---|
the type of permission |
|
a comma-separated list of roles to apply the permission to |
|
A simple role mapping that can be used to map roles from external authentication providers (i.e. LDAP) to internal roles |
|
The external role which should be mapped |
|
The internal role which should be assigned to the authenticated user |
12. broker-plugin type
Name | Description |
---|---|
properties to configure a plugin |
|
the name of the broker plugin class to instantiate |
13. metrics-plugin type
Name | Description |
---|---|
properties to configure a plugin |
|
the name of the metrics plugin class to instantiate |
14. resource-limit type
Name | Description | Default |
---|---|---|
the name of the user to whom the limits should be applied |
n/a |
|
how many connections are allowed by the matched user |
-1 (no max) |
|
how many queues can be created by the matched user |
-1 (no max) |
15. grouping-handler type
Name | Description | Default |
---|---|---|
A unique name |
n/a |
|
|
n/a |
|
A reference to a |
n/a |
|
How long to wait for a decision |
5000 |
|
How long a group binding will be used. |
-1 (disabled) |
|
How often the reaper will be run to check for timed out group bindings.
Only valid for |
30000 |
16. amqp-connection type
Name | Description | Default |
---|---|---|
AMQP broker connection URI (required) |
n/a |
|
A unique name |
n/a |
|
Broker authentication user (optional) |
n/a |
|
Broker authentication password (optional) |
n/a |
|
How many attempts should be made to reconnect after failure. |
-1 (infinite) |
|
Broker connection starts automatically with broker |
true |