activemq
Installs and configures Apache ActiveMQ Artemis services.
Dependencies
The role depends on the following collections:
To install, from the collection root directory, run:
ansible-galaxy collections install -r requirements.yml
Versions
AMQ VERSION |
Release Date |
Artemis Version |
Notes |
---|---|---|---|
|
2021.Q4 |
|
|
|
2021.Q3 |
|
|
|
2020.Q4 |
|
Role Defaults
Install options
Variable |
Description |
Default |
---|---|---|
|
Apache Artemis version |
|
|
Apache Artemis install archive filename |
|
|
Apache Artemis download URL |
|
|
Apache Artemis Installation path |
|
|
Root installation directory |
|
|
Perform an offline installation |
|
|
Path local to controller for offline/download of install archives |
|
Service configuration
Variable |
Description |
Default |
---|---|---|
|
POSIX user running the service |
|
|
POSIX group running the service |
|
|
PID file for service |
|
|
systemd service unit name |
|
Common configuration
Variable |
Description |
Default |
---|---|---|
|
Name of broker instance to deploy |
|
|
Username for accessing the broker instance |
|
|
Password for accessing the broker instance |
|
|
Whether to allow anonymous logins to the instance |
|
|
Whether to install and configure firewalld |
|
|
Service bind address |
|
|
Service hostname |
|
|
Service http port serving console and REST api |
|
|
URL for jolokia REST api |
|
|
URL for console service |
|
|
RPM package to install for the service |
|
|
Additional JVM options for the service |
|
|
Main port for the broker instance |
|
|
hornetq port for the broker instance |
|
|
AMQP port for the broker instance |
|
|
MQTT port for the broker instance |
|
|
STOMP port for the broker instance |
|
|
Whether to enable port offset |
|
|
Port offset for all default ports |
|
|
Use shared filesystem directory for storage |
|
|
Absolute path of shared directory |
|
|
Whether the systemd unit must require a mounted path (only when using shared storage) |
|
|
Disable automatic creation of destination |
|
|
Queue names comma separated |
|
|
Periodic refresh of configuration in milliseconds; can be disabled by specifying -1 |
|
Journal configuration
Variable |
Description |
Default |
---|---|---|
|
The activemq data directory path |
|
|
Whether to use the file based journal for persistence |
|
|
Whether to persist cache IDs to the journal |
|
|
The duplicate detection circular cache size |
|
|
Journal type, valid values are [ |
|
|
The directory to store paged messages in |
|
|
The folder in use for the bindings folder |
|
|
The directory to store the journal files in |
|
|
The directory to store large messages |
|
|
Whether to use msync/fsync on journal operations |
|
|
How many journal files to pre-create |
|
|
The upper threshold of the journal file pool, -1 means no Limit |
|
|
The block size by the device |
|
|
The size (in bytes) of each journal file |
|
|
The Flush timeout for the journal buffer |
|
|
The maximum number of write requests that can be in the ASYNCIO queue at any one time |
|
|
Whether to enable JDBC persistence |
|
|
The full JDBC connection URL for your database server |
|
|
The name of the table in which bindings data will be persisted |
|
|
The name of the table in which bindings data will be persisted |
|
|
The name of the table in which messages and related data will be persisted |
|
|
The fully qualified class name of the desired database Driver |
|
Acceptors / connectors
Variable |
Description |
Default |
---|---|---|
|
Acceptors configuration; list of |
Generate same configuration as |
|
Connectors configuration; list of |
Generate same configuration as |
Sample acceptor:
- name: amqp
bind_address: {{ activemq_host }}
bind_port: {{ activemq_port_amqp }}
parameters:
tcpSendBufferSize: 1048576
tcpReceiveBufferSize: 1048576
protocols: AMQP
useEpoll: true
amqpMinLargeMessageSize: 102400
amqpCredits: 1000
amqpLowCredits: 300
amqpDuplicateDetection: true
Sample connector with TLS:
- name: amqp
address: 172.168.10.43
port: 61616
parameters:
tcpSendBufferSize: 1048576
tcpReceiveBufferSize: 1048576
protocols: CORE
useEpoll: true
sslEnabled: True
keyStorePath: "{{ activemq_tls_keystore_dest }}"
keyStorePassword: "{{ activemq_tls_keystore_password }}"
trustStorePath: "{{ activemq_tls_truststore_dest }}"
trustStorePassword: "{{ activemq_tls_truststore_password }}"
verifyHost: False
Addresses configuration
Variable |
Description |
Default |
---|---|---|
|
Addresses/queue configuration; list of |
Generate same configuration as |
Sample addresses:
- name: ExpiryQueue
anycast:
- name: ExpiryQueue
- name: Virtual
anycast:
- name: Virtual
filter: "discard='true'"
max_consumers: 5
consumers_before_dispatch: 1
Address settings
Variable |
Description |
Default |
---|---|---|
|
Address settings configuration; list of |
“Generate same configuration as |
Sample address settings:
- match: activemq.management#
parameters:
dead_letter_address: DLQ
expiry_address: ExpiryQueue
redelivery_delay: 0
max_size_bytes: -1
message_counter_history_day_limit: 10
address_full_policy: PAGE
auto_create_queues: true
auto_create_addresses: true
auto_create_jms_queues: true
auto_create_jms_topics: true
The parameters are snake_cased variants of the artemis configuration schema elements, which are kebab-cased (ie. dead-letter-address
-> dead_letter_address
).
Diverts configuration
Variable |
Description |
Default |
---|---|---|
|
Diverts configuration; list of |
|
Sample divert:
- name: SAMPLEDIVERT
address: FROMQUEUE
forwarding_address: TOQUEUE
routing_type: ANYCAST
filter: "msgType LIKE '%ff%'"
exclusive: True
Clustering
Variable |
Description |
Default |
---|---|---|
|
Whether to enable clustering |
|
|
Cluster username |
|
|
Cluster user password |
|
|
Cluster max hops |
|
|
Policy for cluster load balancing |
|
|
Enables replication |
|
|
Designate instance as replicated node |
|
|
Cluster discovery: [ |
|
|
Whether systemd unit should wait for activemq port before returning |
|
|
Whether systemd unit should wait for service to be up in logs |
|
TLS/SSL protocol
Variable |
Description |
Default |
---|---|---|
|
Whether to enable TLS |
|
|
Path for installation of truststore |
|
|
Whether to enable TLS mutual auth, requires TLS enabled |
|
|
Path for installation of truststore |
|
See Role Variables below for additional TLS/SSL settings.
Logging
Variable |
Description |
Default |
---|---|---|
|
Whether to enable audit file logging |
|
|
Root logging level |
|
|
Logging level for org.apache.activemq.artemis.core.server |
|
|
Logging level for org.apache.activemq.artemis.journal |
|
|
Logging level for org.apache.activemq.artemis.utils |
|
|
Logging level for org.apache.activemq.artemis.utils.critical |
|
|
Logging level for org.apache.activemq.artemis.jms |
|
|
Logging level for org.apache.activemq.artemis.integration.bootstrap |
|
|
Logging level for org.eclipse.jetty |
|
|
Logging level for org.apache.curator |
|
|
Logging level for org.apache.zookeeper |
|
Other options
Variable |
Description |
Default |
---|---|---|
|
Enable Native IO using libaio |
|
|
Whether to disable AMQP protocol |
|
|
Whether to disable HORNETQ protocol |
|
|
Whether to disable MQTT protocol |
|
|
Whether to disable STOMP protocol |
|
|
Port for prometheus JMX exporter to listen |
|
|
JMX exporter configuration path |
|
|
Enable install and configuration of prometheus-jmx-exporter |
|
|
The rpm package name providing JMX exporter |
|
|
Enable install and configuration of prometheus metrics plugin |
|
|
Human readable service name |
|
|
Broker instance configuration directory |
|
|
Broker instance configuration file |
|
|
Filename of custom broker xml configuration file to be deployed |
`` |
|
Filename of custom systemd unit template to be deployed |
`` |
User / Role configuration
Variable |
Description |
Default |
---|---|---|
|
List of users the create with role; user is not created if password empty. List of (user,password,role) dicts |
|
|
List of roles to create. List of (role,permissions) dicts where permissions is a list of amq broker permissions |
|
|
Artemis role for hawtio console access |
|
|
Management console access methods for roles in |
|
|
Management console access methods per domain for roles in |
|
|
List of CORS allow origin setting for jolokia |
|
|
Whether to enforce strict checking for CORS |
|
Sample user/role configuration with one admin, a consumer and a producer:
activemq_hawtio_role: admin
activemq_users:
- user: amq
password: amqbrokerpass
roles: [ admin ]
- user: other
password: amqotherpass
roles: [ consumer, producer ]
activemq_roles:
- name: admin
permissions: [ createNonDurableQueue, deleteNonDurableQueue, createDurableQueue, deleteDurableQueue, createAddress, deleteAddress, consume, browse, send, manage ]
- name: consumer
match: topics.#
permissions: [ consume, browse ]
- name: producer
match: topics.#
permissions: [ send, browse ]
Role Variables
Variable |
Description |
Required |
---|---|---|
|
|
|
|
Keystore path for TLS connections |
when |
|
Keystore password for TLS connections |
when |
|
Truststore to use for TLS mutual authentication |
when |
|
Password for truststore |
when |
Example Playbook
---
- hosts: all
collections:
- middleware_automation.amq
roles:
- activemq