From 557cd23143e6e833a59468a77cd059f7fbc908ed Mon Sep 17 00:00:00 2001 From: Guido Grazioli Date: Wed, 14 Aug 2024 13:04:25 +0200 Subject: [PATCH 1/3] Update jolokia access when bind host and port are changed --- roles/activemq/tasks/configure_files.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/roles/activemq/tasks/configure_files.yml b/roles/activemq/tasks/configure_files.yml index c818c6e..1841850 100644 --- a/roles/activemq/tasks/configure_files.yml +++ b/roles/activemq/tasks/configure_files.yml @@ -32,6 +32,18 @@ notify: - restart amq_broker +- name: "Configure console binding" + become: true + middleware_automation.common.xml: + path: "{{ activemq.instance_home }}/etc/bootstrap.xml" + xpath: /b:broker/b:web/b:binding + attribute: uri + value: "http{{ 's' if activemq_tls_enabled else '' }}://{{ activemq_host }}:{{ activemq_http_port }}" + namespaces: + b: http://activemq.apache.org/schema + notify: + - restart amq_broker + - name: "Configure using properties file" become: true ansible.builtin.template: @@ -42,4 +54,4 @@ mode: '0644' notify: - restart amq_broker - when: activemq_properties_file != '' \ No newline at end of file + when: activemq_properties_file != '' From 8f6acb00d22758fb90c4173e0d1d5ca6d3898a1a Mon Sep 17 00:00:00 2001 From: Guido Grazioli Date: Wed, 14 Aug 2024 13:14:21 +0200 Subject: [PATCH 2/3] handle activemq / amq_broker xsd --- roles/activemq/tasks/configure_files.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/activemq/tasks/configure_files.yml b/roles/activemq/tasks/configure_files.yml index 1841850..eeee88d 100644 --- a/roles/activemq/tasks/configure_files.yml +++ b/roles/activemq/tasks/configure_files.yml @@ -36,8 +36,8 @@ become: true middleware_automation.common.xml: path: "{{ activemq.instance_home }}/etc/bootstrap.xml" - xpath: /b:broker/b:web/b:binding - attribute: uri + xpath: "{{ '/b:broker/b:web/b:binding' if amq_broker_enable is defined else '/b:broker/b:web' }}" + attribute: "{{ 'uri' if amq_broker_enable is defined else 'bind' }}" value: "http{{ 's' if activemq_tls_enabled else '' }}://{{ activemq_host }}:{{ activemq_http_port }}" namespaces: b: http://activemq.apache.org/schema From 636f3eaea64fae74828494b5ed7a849600647f02 Mon Sep 17 00:00:00 2001 From: Guido Grazioli Date: Wed, 14 Aug 2024 17:06:31 +0200 Subject: [PATCH 3/3] update tests --- molecule/amq_upgrade/converge.yml | 2 +- molecule/amq_upgrade/prepare.yml | 2 +- .../files/artemis-configuration-2.36.xsd | 5031 +++++++++++++++++ roles/activemq/tasks/configure_files.yml | 4 +- roles/activemq/tasks/upgrade.yml | 6 +- 5 files changed, 5038 insertions(+), 7 deletions(-) create mode 100644 roles/activemq/files/artemis-configuration-2.36.xsd diff --git a/molecule/amq_upgrade/converge.yml b/molecule/amq_upgrade/converge.yml index e1378c7..a22bfbc 100644 --- a/molecule/amq_upgrade/converge.yml +++ b/molecule/amq_upgrade/converge.yml @@ -12,4 +12,4 @@ ansible.builtin.include_role: name: middleware_automation.amq.activemq vars: - activemq_version: "{{ '7.10.1' if amq_broker_enable is defined and amq_broker_enable else '2.21.0' }}" + activemq_version: "{{ '7.12.0' if amq_broker_enable is defined and amq_broker_enable else '2.36.0' }}" diff --git a/molecule/amq_upgrade/prepare.yml b/molecule/amq_upgrade/prepare.yml index 2159116..d61dace 100644 --- a/molecule/amq_upgrade/prepare.yml +++ b/molecule/amq_upgrade/prepare.yml @@ -9,4 +9,4 @@ ansible.builtin.include_role: name: middleware_automation.amq.activemq vars: - activemq_version: "{{ '7.9.4' if amq_broker_enable is defined and amq_broker_enable else '2.18.0' }}" + activemq_version: "{{ '7.10.1' if amq_broker_enable is defined and amq_broker_enable else '2.34.0' }}" diff --git a/roles/activemq/files/artemis-configuration-2.36.xsd b/roles/activemq/files/artemis-configuration-2.36.xsd new file mode 100644 index 0000000..9827ba7 --- /dev/null +++ b/roles/activemq/files/artemis-configuration-2.36.xsd @@ -0,0 +1,5031 @@ + + + + + + + + + + + + + + Node name. If set, it will be used in topology notifications. + + + + + + + + This defines the prefix which we will use to parse System properties for the configuration. Default= + + + + + + + + Artemis uses internal queues and addresses for implementing certain behaviours. These queues and addresses + will be prefixed by default with "$.activemq.internal" to avoid naming clashes with user namespacing. + This can be overridden by setting this value to a valid Artemis address. + + + + + + + + This enables making AMQP subscription queue names, match core queue names, for better interoperability between protocols. + Note: Enabling this to an existing broker if pre-existing amqp durable subscriptions already existed will require + clients to re-subscribe and to clean up old subscription names. + + + + + + + + If true then the ActiveMQ Artemis Server will make use of any Protocol Managers that are in available + on the classpath. If false then only the core protocol will be available, unless in Embedded mode + where users can inject their own Protocol Managers. + + + + + + + + that means the server will use fdatasync to confirm writes on the disk. + + + + + + + + Should sync large messages before closing the file. + + + + + + + + true means that the server will use the file based journal for persistence. + + + + + + + + Maximum number of threads to use for the scheduled thread pool + + + + + + + + Maximum number of threads to use for the thread pool. -1 means 'no limits'. + + + + + + + + true means that graceful shutdown is enabled + + + + + + + + how long (in ms) to wait for clients to disconnect before shutting down the server + + + + + + + + true means that security is enabled + + + + + + + + how long (in ms) to wait before invalidating an entry in the authentication or authorization cache + + + + + + + + how large to make the authentication cache + + + + + + + + how large to make the authorization cache + + + + + + + + how long (in ms) to wait to acquire a file lock on the journal + + + + + + + + true means that the server supports wild card routing + + + + + + + + the name of the management address to send management messages to. It is prefixed with "jms.queue" so + that JMS clients can send messages to it. + + + + + + + + the name of the address that consumers bind to receive management notifications + + + + + + + + Cluster username. It applies to all cluster configurations. + + + + + + + + Cluster password. It applies to all cluster configurations. + + + + + + + + Class 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. + + + + + + + + This option controls whether passwords in server configuration need be masked. If set to "true" the + passwords are masked. + + + + + + + + DEPRECATED: the name of the factory class to use for log delegation + + + + + + + + true means that the management API is available via JMX + + + + + + + + the JMX domain used to registered ActiveMQ Artemis MBeans in the MBeanServer + + + + + + + + Whether or not to use the broker name in the JMX properties + + + + + + + + true means that message counters are enabled + + + + + + + + the sample period (in ms) to use for message counters + + + + + + + + how many days to keep message counter history + + + + + + + + if set, this will override how long (in ms) to keep a connection alive without receiving a ping. -1 + disables this setting. + + + + + + + + how often (in ms) to check connections for ttl violation + + + + + + + + how often (in ms) to check the configuration file for modifications + + + + + + + + the namespace to use for looking up address settings for temporary queues + + + + + + + + should certain 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? + + + + + + + + how long (in ms) before a transaction can be removed from the resource manager after create time + + + + + + + + how often (in ms) to scan for timeout transactions + + + + + + + + how often (in ms) to scan for expired messages + + + + + + + + DEPRECATED: the priority of the thread expiring messages + + + + + + + + how often (in ms) to scan for addresses and queues that need to be deleted + + + + + + + + the size of the cache for pre-creating message ID's + + + + + + + + true means that ID's are persisted to the journal + + + + + + + + a list of <class-name/> elements with the names of classes to use for intercepting incoming + remoting packets + + + + + + + + a list of <class-name/> elements with the names of classes to use for intercepting outgoing + remoting packets + + + + + + + + True means that the delivery count is persisted before delivery. False means that this only happens + after a message has been cancelled. + + + + + + + + The default for this value is 10, however the recommended set for this is 1. + The system will add a store update for every redelivery happening on the system. + It is recommended to keep max-redelivery-records=1 in situations where you are operating with very short redelivery delays as you will be creating unecessary records on the journal. + + + + + + + + true means that the server will add the name of the validated user to messages it sends + + + + + + + + true means that the server will not allow any message that doesn't have a validated user, in JMS this is JMSXUserID + + + + + + + + how often (in ms) to scan for expired MQTT sessions + + + + + + + + how long (in ms) to wait to persist MQTT session state + + + + + + + + + + + + + + + + + + + DEPRECATED: a list of pre configured queues to create + + + + + + + + + + + address for the queue + + + + + + + user to associate for creating the queue + + + + + + + + whether the queue is durable (persistent) + + + + + + + + unique name of this queue + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the directory to store paged messages in + + + + + + + + the directory to store the persisted bindings to + + + + + + + + true means that the server will create the bindings directory on start up + + + + + + + + The max number of concurrent reads allowed on paging + + + + + + + + Whether the whole page is read while getting message after page cache is evicted. + + + + + + + + the directory to store the journal files in + + + + + + + + the directory to store journal-retention message in and rention configuraion. + + + + + + + + + This configures the period type to use on limit. By default it is DAYS. + + + + + + + + + + + + + + + The amount of time used to keep files. + + + + + + + Size (in bytes) before we starting removing files from the retention area. + this is an extra protection on top of the period. + Notice we first remove files based on period and if you're using more storage then you + configured we start removing older files. + By default this is unlimited (not filled). + Supports byte notation like "K", "Mb", "MiB", "GB", etc. + + + + + + + + + + + + the directory to store the node manager lock file + + + + + + + + true means that the journal directory will be created + + + + + + + + the type of journal to use + + + + + + + + + + + + + + + The timeout (in nanoseconds) used to flush internal buffers on the journal. The exact default value + depend on whether the journal is ASYNCIO or NIO. + + + + + + + + The size in bytes used by the device. This is usually translated as fstat/st_blksize + And this is a way to bypass the value returned as st_blksize. + + + + + + + + The size (in bytes) of the internal buffer on the journal. + Supports byte notation like "K", "Mb", "MiB", "GB", etc. + + + + + + + + if true wait for transaction data to be synchronized to the journal before returning response to + client + + + + + + + + if true wait for non transaction data to be synced to the journal before returning response to client. + + + + + + + + Whether to log messages about the journal write rate + + + + + + + + The size (in bytes) of each journal file. + Supports byte notation like "K", "Mb", "MiB", "GB", etc. + + + + + + + + how many journal files to pre-create + + + + + + + + how many journal files to pre-create + + + + + + + + The percentage of live data on which we consider compacting the journal + + + + + + + + The minimal number of data files before we can start compacting + + + + + + + + the 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. + + + + + + + + the length of time in seconds to wait when opening a new Journal file before timing out and failing + + + + + + + + Interval to log server specific information (e.g. memory usage etc) + + + + + + + + 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. + + + + + + + + Size (in bytes) before all addresses will enter into their Full Policy configured upon messages being + produced. + Supports byte notation like "K", "Mb", "MiB", "GB", etc. + + + + + + + + Max percentage of disk usage before the system blocks or fails clients. Will be overrided by + min-disk-free if both are set. + + + + + + + + Min free bytes on disk below which the system blocks or fails clients. Supports byte notation like + "K", "Mb", "GB", etc. Will override max-disk-usage if both are set. + + + + + + + + how often (in ms) to scan the disks for full disks. + + + + + + + + Percentage of available memory which will trigger a warning log + + + + + + + + frequency to sample JVM memory in ms (or -1 to disable memory sampling) + + + + + + + + the directory to store large messages + + + + + + + + + + should analyze response time on critical paths and decide for broker log, shutdown or halt. + + + + + + + + The default timeout used on analyzing timeouts on the critical path. + + + + + + + + The timeout here will be defaulted to half critical-analyzer-timeout, calculation happening at runtime + + + + + + + + Should the server log, be shutdown or halted upon critical analysis failure. + + + + + + + + + + + + + + + The timeout (in nanoseconds) used to sync pages. The exact default value + depend on whether the journal is ASYNCIO or NIO. + + + + + + + + The number of times a mirror target would retry an acknowledgement on the queue before scanning page files for the message. + + This is exposed as mirrorAckManagerQueueAttempts on broker properties. + + + + + + + + The number of times a mirror target would retry an acknowledgement on paging. + + This is exposed as mirrorAckManagerPageAttempts on broker properties. + + + + + + + + Period in milliseconds for which retries are going to be exercised. + This is exposed as mirrorAckManagerRetryDelay on broker properties. + + + + + + + + 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 false, and the overhead of paged messages will be smaller, but there is a possibility of eventual duplicates in case of interrupted communication between the mirror source and target. + If you set this to true there will be a record stored on the journal for the page-transaction additionally to the record in the page store. + + This is exposed as mirrorPageTransactions on broker properties. + + + + + + + + Whether or not to suppress SESSION_CREATED and SESSION_CLOSED notifications. + Set to true to reduce notification overhead. However, these are required to + enforce unique client ID utilization in a cluster for MQTT clients. + + + + + + + + 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. + + + + + + + + The regular expression pattern to match management or JMX operations that require the 'view' permission + in your security-settings. Operations that don't match will default to the 'update' permission. + + + + + + + + Whether to apply RBAC based on security-settings for management operations when accessed through messages sent to the management address. + When set, the 'view' and 'update' permissions are applied to individual management operations based on the message contents. The `manage` permissions is still required to send the messages. + The security-settings match addresses will use the management-rbac-prefix prefix. + + + + + + + + The prefix for security-settings match addresses that control RBAC for management operations. Only configure a value if the default causes a clash in your security settings match criteria. + + + + + + + + + + + + + DEPRECATED: use metrics instead. A metrics plugin + + + + + + + properties to configure a plugin + + + + + + + + the name of the metrics plugin class to instantiate + + + + + + + + + + + + + + + + + + + + + A comma separated list of IPs to be used to validate if the broker should be kept up + + + + + + + + A comma separated list of URLs to be used to validate if the broker should be kept up + + + + + + + + A frequency in milliseconds to how often we should check if the network is still up + + + + + + + + A timeout used in milliseconds to be used on the ping. + + + + + + + + The network interface card name to be used to validate the address. + + + + + + + + The ping command used to ping IPV4 addresses. + + + + + + + + The ping command used to ping IPV6 addresses. + + + + + + + + + + + + + + local bind address that the datagram socket is bound to + + + + + + + + local port to which the datagram socket is bound to + + + + + + + + + + + + + + + restricts a clusters connections to the listed connector-ref's + + + + + + + + + + + + + name of the discovery group to use for this connection + + + + + + + + + + + + a list of broadcast groups to create + + + + + + + + + + + + + + + + a local address to which the datagram socket is bound + + + + + + + a local port to which the datagram socket is bound + + + + + + + multicast address to which the data will be broadcast + + + + + + + + UDP port number used for broadcasting + + + + + + + + period in milliseconds between consecutive broadcasts + + + + + + + + Name of JGroups configuration file. If specified, the server uses JGroups for broadcasting. + + + + + + + + Name of JGroups Channel. If specified, the server uses the named channel for broadcasting. + + + + + + + + + + + a unique name for the broadcast group + + + + + + + + + + + a list of discovery groups to create + + + + + + + + a discovery group specification element + + + + + + + + + + + + + + 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. + + + + + + + + + + time to wait for an initial broadcast to give us at least one node in the cluster + + + + + + + + + a unique name for the discovery group + + + + + + + + + + unlimited sequence of <class-name/> + + + + + + + the fully qualified name of the interceptor class + + + + + + + + + + + + Key of a configuration parameter + + + + + + + Value of a configuration parameter + + + + + + + + + + + a list of bridges to create + + + + + + + + + + + + + + + + name of queue that this bridge consumes from + + + + + + + + address to forward to. If omitted original address is used + + + + + + + + whether this bridge supports fail-over + + + + + + + + + + optional name of transformer class + + + + + + + + optional transformer configuration + + + + + + + + Any message larger than this size (in bytes) is considered a large message (to be sent in chunks). + Supports byte notation like "K", "Mb", "MiB", "GB", etc. + + + + + + + + The period (in milliseconds) a bridge's client will check if it failed to receive a ping from the + server. -1 disables this check. + + + + + + + + how long to keep a connection alive in the absence of any data arriving from the client. This should + be greater than the ping period. + + + + + + + + period (in ms) between successive retries + + + + + + + + multiplier to apply to successive retry intervals + + + + + + + + Limit to the retry-interval growth (due to retry-interval-multiplier) + + + + + + + + maximum number of initial connection attempts, -1 means 'no limits' + + + + + + + + maximum number of retry attempts, -1 means 'no limits' + + + + + + + + DEPRECATED: This setting has no impact, but it's being left here to avoid XML parsing errors for users + who still have it set. Failover on shutdown is controlled via the ha-policy set on the *broker* to + which the bridge connects. + + + + + + + + should duplicate detection headers be inserted in forwarded messages? + + + + + + + + Once the bridge has received this many bytes, it sends a confirmation. + Supports byte notation like "K", "Mb", "MiB", "GB", etc. + + + + + + + + Producer flow control. + Supports byte notation like "K", "Mb", "MiB", "GB", etc. + + + + + + + + username, if unspecified the cluster-user is used + + + + + + + + password, if unspecified the cluster-password is used + + + + + + + + configures the number of times reconnection attempts will be made to the same node on the topology + before reverting back to the initial connector(s) + + + + + + + + how should the routing-type on the bridged messages be set? + + + + + + + + Number of concurrent workers, more workers can help increase throughput on high latency networks. + Defaults to 1 + + + + + + + + how long to wait for acknowledgements to arrive from the bridge's target while stopping or pausing the bridge + + + + + + + + + + + + unique name for this bridge + + + + + + + + + + + a list of federations to create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the transport connector reference to use for the new upstream connection + back to this broker. + + + + + + + + + + + + + + + + + + + + + whether this connection supports fail-over + + + + + + + + whether this connection supports fail-over + + + + + + + + if there is a downstream and upstream connection configured for the same broker then + the same connection will be shared as long as both stream configs set this flag to true + + + + + + + + how long to keep a connection alive in the absence of any data arriving from the client + + + + + + + + How long to wait for a reply + + + + + + + + period (in ms) between successive retries + + + + + + + + multiplier to apply to the retry-interval + + + + + + + + Maximum value for retry-interval + + + + + + + + How many attempts should be made to connect initially + + + + + + + + How many attempts should be made to reconnect after failure + + + + + + + + The period (in milliseconds) used to check if the federation connection has failed to receive pings from + another server + + + + + + + + How long to wait for a reply if in the middle of a fail-over. -1 means wait forever. + + + + + + + + + + + + + + + + + + + name of discovery group used by this connection + + + + + + + + + + + + + + username, if unspecified the federated user is used + + + + + + + password, if unspecified the federated password is used + + + + + + + unique name for this upstream + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + optional name of transformer class + + + + + + + properties to configure the transformer class + + + + + + + + + + + + + + + optional name of transformer class + + + + + + + properties to configure the transformer class + + + + + + + + + + + + + key for the property + + + + + + + value for the property + + + + + + + + + + + + a list of cluster connections + + + + + + + + + + + + + + + + + + A list of connections the broker will make towards other servers. + Currently the only connection type supported is amqpConnection + + + + + + + + + + + + + + A list of connection routers + + + + + + + + + + + + + + + + the optional target key + + + + + + + the filter for the target key + + + + + + + the filter to get the local target + + + + + + + the time period for a cache entry to remain active + + + + + + + the policy configuration + + + + + + + the pool configuration + + + + + + + the key transformer configuration + + + + + + + + a unique name for the connection router + + + + + + + + + + + + + + + + + + + + + true means that the cache entries are persisted + + + + + + + the timeout (in milliseconds) before removing cache entries + + + + + + + + + + + + + properties to configure a policy + + + + + + + + the name of the policy + + + + + + + + + + + + properties to configure a key transformer + + + + + + + + the name of the policy + + + + + + + + + + + + the username to access the targets + + + + + + + the password to access the targets + + + + + + + the period (in milliseconds) used to check if a target is ready + + + + + + + the minimum number of ready targets + + + + + + + the timeout (in milliseconds) used to get the minimum number of ready targets + + + + + + + true means that the local target is enabled + + + + + + + + the name of a cluster connection + + + + + + + + + + + + + + + + + name of discovery group used by this bridge + + + + + + + + + + + + + + + + + + + + + + + + + uri of the amqp connection + + + + + + + should the broker connection be started when the server is started. + + + + + + + How many attempts should be made to reconnect after failure + + + + + + + period (in ms) between successive retries + + + + + + + User name used to connect. If not defined it will try an anonymous connection. + + + + + + + Password used to connect. If not defined it will try an anonymous connection. + + + + + + + + name of the amqp connection + + + + + + + + + + + address expression to match addresses + + + + + + + This is the exact queue name to be used. + + + + + + + + + This will determine that queues are mirrored towards this next broker. + All events will be send towards this AMQP connection acting like a replica. + + + + + + + Optional properties that can be applied to the mirror configuration + + + + + + + + Should mirror acknowledgements towards the other server + + + + + + + Should mirror queue creation events for addresses and queues. + + + + + + + Should mirror queue deletion events for addresses and queues. + + + + + + + This property will determine if the mirror will use a durable queue or not as a Store and Forward Queue. + This is true by default. + + + + + + + If this is true, client blocking operations will be waiting a response from the mirror before the unblocking the operation. + This is false by default. + + + + + + + This defines a filter that mirror will use to determine witch events will be forwarded toward + target server based on source address. + + + + + + + + + This create a federation between this broker and the remote that is being + connected to, federation can occur in either direction over this connection + depending on the address and queue policy configurations. + + + + + + + + + + + + + Optional properties that can be applied to the federation configuration + + + + + + + + + + + + + + Optional properties that can be applied to the Queue federation policy + + + + + + + + an optional class name of a transformer + + + + + + + optional transformer configuration + + + + + + + + + + + + + + + + + + + Optional properties that can be applied to the Address federation policy + + + + + + + + an optional class name of a transformer + + + + + + + optional transformer configuration + + + + + + + + + + + + + + + + + + + uri of the cluster connection + + + + + + + name of the cluster connection + + + + + + + + + + + + name of the address this cluster connection applies to + + + + + + + + Name of the connector reference to use. + + + + + + + + The period (in milliseconds) used to check if the cluster connection has failed to receive pings from + another server + + + + + + + + how long to keep a connection alive in the absence of any data arriving from the client + + + + + + + + Messages larger than this are considered large-messages. + Supports byte notation like "K", "Mb", "MiB", "GB", etc. + + + + + + + + How long to wait for a reply + + + + + + + + period (in ms) between successive retries + + + + + + + + multiplier to apply to the retry-interval + + + + + + + + Maximum value for retry-interval + + + + + + + + How many attempts should be made to connect initially + + + + + + + + How many attempts should be made to reconnect after failure + + + + + + + + should duplicate detection headers be inserted in forwarded messages? + + + + + + + + DEPRECATED: use message-load-balancing-type instead. Select STRICT to mimic + forward-when-no-consumers=true and ON_DEMAND to mimic forward-when-no-consumers=false. + + + + + + + + how should messages be load balanced between servers in a cluster? + + + + + + + + + + + + + + + + maximum number of hops cluster topology is propagated + + + + + + + + The size (in bytes) of the window used for confirming data from the server connected to. + Supports byte notation like "K", "Mb", "MiB", "GB", etc. + + + + + + + + Producer flow control. + Supports byte notation like "K", "Mb", "MiB", "GB", etc. + + + + + + + + How long to wait for a reply if in the middle of a fail-over. -1 means wait forever. + + + + + + + + how often the cluster connection will notify the cluster of its existence right after joining the + cluster + + + + + + + how many times this cluster connection will notify the cluster of its existence right after joining + the cluster + + + + + + + + The connector to use for scaling down or when as backup in SCALE_DOWN mode + + + + + + + + + + + + unique name for this cluster connection + + + + + + + The URI for the cluster connection options + + + + + + + + + + + unique name for this cluster connection + + + + + + + The URI for the cluster connection options + + + + + + + + + + + a list of diverts to use + + + + + + + + + + + + + + + + an optional class name of a transformer + + + + + + + + optional transformer configuration + + + + + + + + whether this is an exclusive divert + + + + + + + + the routing name for the divert + + + + + + + + the address this divert will divert from + + + + + + + + the forwarding address for the divert + + + + + + + + + + how should the routing-type on the diverted messages be set? + + + + + + + + + a unique name for the divert + + + + + + + + + + + The Store Type used by the server + + + + + + + + + + Use a file based store for persisting journal, paging and large messages + + + + + + + Use a database for persisting journal, paging and large messages + + + + + + + + + + + + + + + + + The JDBC Driver class name + + + + + + + The JDBC Connection URL e.g. jdbc:mysql://localhost:3306/ + + + + + + + The JDBC User to use for connecting to the database, NB this will only work with drivers where support + DriverManager.getConnection(String url, String user, String password). This can be encrypted. + + + + + + + The JDBC Password to use for connecting to the database, NB this will only work with drivers where support + DriverManager.getConnection(String url, String user, String password). This can be encrypted. + + + + + + + The DataSource class name + + + + + + + A list of options for the DataSource + + + + + + + + A key-value pair option for the DataSource + + + + + + + + + + The table name used to store message journal entries + + + + + + + The table name used to store bindings journal entries + + + + + + + The table name used to large message files + + + + + + + The table name used to large message files + + + + + + + The table name used to hold shared store data + + + + + + + The JDBC network connection timeout in milliseconds. + + + + + + + The period in milliseconds of the keep alive service of a JDBC lock. + + + + + + + The time in milliseconds a JDBC lock is considered valid without keeping it alive. + + + + + + + The JDBC jouranl sync period in milliseconds. + + + + + + + The maximal time offset between the broker and the database in milliseconds when requesting the + current time of the database while updating and validating primary and backup locks. + + + + + + + The max page size (in bytes) to use for all addresses when using JDBC. + Supports byte notation like "K", "Mb", "MiB", "GB", etc. + + + + + + + + + + + + Configuration option key + + + + + + + Configuration option value + + + + + + + + + + The HA policy of this server + + + + + + + + DEPRECATED FOR REMOVAL: use 'primary-only' instead. + + + + + + + A primary only server with no HA capabilities apart from scale down. + + + + + + + Configuration for a replicated server, either primary, backup or colocated. + + + + + + + Configuration for a shared store server, either primary, backup or colocated. + + + + + + + + + + + + + + The distributed-primitive-manager class name + + + + + + + A list of options for the distributed-primitive-manager + + + + + + + + A key-value pair option for the distributed-primitive-manager + + + + + + + + + + + + + + + A primary server configured to replicate. + + + + + + + DEPRECATED FOR REMOVAL: use 'primary' instead. + + + + + + + A backup server configured to replicate. + + + + + + + DEPRECATED FOR REMOVAL. Use 'backup' instead. + + + + + + + a replicated primary server that will allow requests to create colocated replicated backup servers. + + + + + + + + + + + + + If true then the server will request a backup on another node + + + + + + + How many times the primary server will try to request a backup, -1 means forever. + + + + + + + How long to wait for retries between attempts to request a backup server. + + + + + + + Whether this server will accept backup requests. + + + + + + + The offset to use for the Connectors and Acceptors when creating a new backup server. + + + + + + + the connectors that shouldn't have their ports offset, typically remote connectors or the + connector used in the cluster connection if scaling down + + + + + + + + + + + + + DEPRECATED FOR REMOVAL. Use 'primary' instead. + + + + + + + The configuration for the primary replicated server. + + + + + + + DEPRECATED FOR REMOVAL. Use 'backup' instead. + + + + + + + The configuration for any backups created. + + + + + + + + + + + + + If true then the server will request a backup on another node + + + + + + + How many times the server will try to request a backup, -1 means forever. + + + + + + + How long to wait for retries between attempts to request a backup server. + + + + + + + Whether this server will accept backup requests. + + + + + + + The offset to use for the Connectors and Acceptors when creating a new backup server. + + + + + + + DEPRECATED FOR REMOVAL. Use 'primary' instead. + + + + + + + The configuration for the primary shared store server. + + + + + + + DEPRECATED FOR REMOVAL. Use 'backup' instead. + + + + + + + The configuration for any shared store backups created. + + + + + + + + + + + + + DEPRECATED FOR REMOVAL: use 'primary' instead. + + + + + + + A shared store primary server configuration. + + + + + + + DEPRECATED FOR REMOVAL. Use 'backup' instead. + + + + + + + A shared store backup server configuration. + + + + + + + A shared store colocated configuration + + + + + + + + + + + + + DEPRECATED: The scale down configuration of this server. + + + + + + + + + + + + + The scale down configuration of this server. + + + + + + + + + + + + + used for replication, if set, (remote) backup servers will only pair with primary servers with matching + group-name + + + + + + + Name 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 primary servers that + may attempt fail-back. + + + + + + + This option specifies how many replication backup directories will be kept when server starts as replica. + Every time when server starts as replica all former data moves to 'oldreplica.{id}' directory, where id is growing backup index, + this parameter sets the maximum number of such directories kept on disk. + + + + + + + DEPRECATED: use 'check-for-active-server' instead. + + + + + + + Whether to check the cluster for a (live) server using our own server ID when starting + up. This option is only necessary for performing 'fail-back' on replicating + servers. Strictly speaking this setting only applies to primary servers and not to + backups. + + + + + + + The amount of time to wait for the replica to acknowledge it has received all the necessary data from + the replicating server at the final step of the initial replication synchronization process. + + + + + + + Whether this primary broker should vote to remain active if replication is lost. + + + + + + + The quorum size used for voting after replication loss, -1 means use the current cluster size + + + + + + + If we start as a replica and lose connection to the primary, how many times should we attempt to vote + for quorum before restarting + + + + + + + How long to wait (in milliseconds) between each vote + + + + + + + How long to wait (in seconds) for vote results + + + + + + + If we start as a replica how long to wait (in milliseconds) before trying to replicate again after failing to find a replica + + + + + + + The manager used to manage distributed locks used for this type of replication. + + + + + + + The common identity to use for coordination that is shared across instances that will replicate. + The value will be used as the internal server nodeId and as the identity of entities in the + distributed-primitive-manager. + + + + + + + + + + + + + used for replication, if set, (remote) backup servers will only pair with primary servers with matching + group-name + + + + + + + Name 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 primary servers that + may attempt fail-back. + + + + + + + This option specifies how many replication backup directories will be kept when server starts as replica. + Every time when server starts as replica all former data moves to 'oldreplica.{id}' directory, where id is growing backup index, + this parameter sets the maximum number of such directories kept on disk. + + + + + + + if provided then this backup will scale down rather than becoming active after fail over. + + + + + + + Will this server, if a backup, restart once it has been stopped because of failback or scaling down. + + + + + + + Whether 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. + + + + + + + DEPRECATED: if we have to start as a replicated server this is the delay to wait before fail-back + occurs + + + + + + + If we have to start as a replicated server this is the amount of time to wait for the replica to + acknowledge it has received all the necessary data from the replicating server at the final step + of the initial replication synchronization process. + + + + + + + If we have to start as a replicated server decide whether to vote to remain active if replication is lost. + + + + + + + If we have to start as a replicated server or we are a backup and lose connection to live, the quorum size + used for voting after replication loss, -1 means use the current cluster size + + + + + + + If we lose connection to the primary, how many times should we attempt to vote for quorum before restarting + + + + + + + How long to wait (in milliseconds) between each vote + + + + + + + How long to wait (in milliseconds) before trying to replicate again after failing to find a replica + + + + + + + How long to wait (in seconds) for vote results + + + + + + + The manager used to manage distributed locks used for this type of replication. + + + + + + + + + + + + + used for replication, if set, (remote) backup servers will only pair with primary servers with matching + group-name + + + + + + + Name 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 primary servers that + may attempt fail-back. + + + + + + + This option specifies how many replication backup directories will be kept when server starts as replica. + Every time when server starts as replica all former data moves to 'oldreplica.{id}' directory, where id is growing backup index, + this parameter sets the maximum number of such directories kept on disk. + + + + + + + if provided then this backup will scale down rather than becoming active after fail over. + + + + + + + Will this server, if a backup, restart once it has been stopped because of failback or scaling down. + + + + + + + + + + + + + DEPRECATED: delay to wait before fail-back occurs on (live's) restart + + + + + + + Will this backup server become active on a normal server shutdown + + + + + + + Will the primary startup wait until it is activated + + + + + + + + + + + + + Whether 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. + + + + + + + DEPRECATED: delay to wait before fail-back occurs on (live's) restart + + + + + + + Will this backup server become active on a normal server shutdown + + + + + + + if provided then this backup will scale down rather than becoming active after fail over. + + + + + + + Will this server, if a backup, restart once it has been stopped because of failback or scaling down. + + + + + + + + + + + + + If true then the server will request a backup on another node + + + + + + + How many times the server will try to request a backup, -1 means forever. + + + + + + + How long to wait for retries between attempts to request a backup server. + + + + + + + Whether this server will accept backup requests. + + + + + + + The offset to use for the Connectors and Acceptors when creating a new backup server. + + + + + + + + + + + + + its possible that you only want a server to partake in scale down as a receiver, via a group. + In this case set scale-down to false + + + + + + + The scale down group to scale down to, a server will only scale down to a server within the same group + + + + + + + + + + The discovery group to use for scale down, if not supplied then the scale-down-connectors or + first + invm connector will be used + + + + + + + + + + A list of connectors to use for scaling down, if not supplied then the scale-down-discovery-group + or + first invm connector will be used + + + + + + + + + + + + + + + + + + Message Group configuration + + + + + + + + + + Each cluster should choose 1 node to have a LOCAL grouping handler and all the other nodes should have + REMOTE handlers + + + + + + + + + + + + + A reference to a cluster connection address + + + + + + + How long to wait for a decision + + + + + + + How long a group binding will be used, -1 means for ever. Bindings are removed after this wait + elapses. On the remote node this is used to determine how often you should re-query the main + coordinator in order to update the last time used accordingly. + + + + + + + How often the reaper will be run to check for timed out group bindings. Only valid for LOCAL handlers + + + + + + + + A name identifying this grouping-handler + + + + + + + + + + + a list of address settings + + + + + + + + + + + + + + Complex type element to configure an address. + + + + + + + the address to send dead messages to + + + + + + + + whether or not to automatically create the dead-letter-address and/or a corresponding queue + on that address when a message found to be undeliverable + + + + + + + + the prefix to use for auto-created dead letter queues + + + + + + + + the suffix to use for auto-created dead letter queues + + + + + + + + the address to send expired messages to + + + + + + + + whether or not to automatically create the expiry-address and/or a corresponding queue + on that address when a message is sent to a matching queue + + + + + + + + the prefix to use for auto-created expiry queues + + + + + + + + the suffix to use for auto-created expiry queues + + + + + + + + Overrides the expiration time for messages using the default value for expiration time. "-1" + disables this setting. + + + + + + + + Overrides the expiration time for messages using a lower value. "-1" disables this setting. + + + + + + + + Overrides the expiration time for messages using a higher value. "-1" disables this setting. + + + + + + + + the time (in ms) to wait before redelivering a cancelled message. + + + + + + + + multiplier to apply to the "redelivery-delay" + + + + + + + + factor by which to modify the redelivery delay slightly to avoid collisions + + + + + + + + Maximum value for the redelivery-delay + + + + + + + + how many times to attempt to deliver a message before sending to dead letter address + + + + + + + + the maximum size (in bytes) for an address (-1 means no limits). This is used in PAGING, BLOCK and + FAIL policies. + Supports byte notation like "K", "Mb", "MiB", "GB", etc. + + + + + + + + the maximum number of messages allowed on the address. This is used in PAGING, BLOCK and FAIL policies. It does not support notations and it is a simple number of messages allowed. + + + + + + + + After the address enters into page mode, this attribute will configure how many pages can be written into page before activating the page-full-policy. + Supports byte notation like "K", "Mb", "MiB", "GB", etc. + + + + + + + + After the address enters into page mode, this attribute will configure how many messages can be written into page before activating the page-full-policy. + + + + + + + + used with the address full BLOCK policy, the maximum size (in bytes) an address can reach before + messages start getting rejected. Works in combination with max-size-bytes for AMQP protocol only. + Default = -1 (no limit). + + + + + + + + The page size (in bytes) to use for an address. + Supports byte notation like "K", "Mb", "MiB", "GB", etc. + + + + + + + + Number of paging files to cache in memory to avoid IO during paging navigation. This is not used any more. and it will be ignored. + + + + + + + + Maximum number of paged messages that the broker can read into memory per-queue. The default value is -1, which means that no limit applies. + + + + + + + How many messages we are reading from paging and keeping ready in queues ready to deliver to consumers. Default: If not defined max-read-page-messages is used. + + + + + + + + Maximum memory, in bytes, that can be used to read paged messages into memory per-queue. + When applying this limit, the broker takes into account both messages that are currently delivering and messages that are ready to be delivered to consumers. + The default value is 2 * page-size (usually being 20 MB). If consumers are slow to acknowledge messages, you can increase the default value to ensure that the memory is not consumed by messages pending acknowledgment, which can starve the broker of messages. + + + + + + + Number of paged messages that the broker can read from disk into memory per-queue. The default value is taken from max-read-page-messages, usually at -1, which means that no limit applies. + + + + + + + what happens when an address where "max-size-bytes" is specified becomes full + + + + + + + + + + + + + + + + After entering page mode, a second limit will be set by page-limit-bytes and/or page-limit-messages. The page-full-policy will configure what to do when that limit is reached. + + + + + + + + + + + + + + how many days to keep message counter history for this address + + + + + + + + This is deprecated please use default-last-value-queue instead. + + + + + + + + whether to treat the queues under the address as a last value queues by default + + + + + + + + the property to use as the key for a last value queue by default + + + + + + + + whether the queue should be non-destructive by default + + + + + + + + whether to treat the queues under the address as exclusive queues by default + + + + + + + + whether to rebalance groups when a consumer is added + + + + + + + + whether to pause dispatch when rebalancing groups + + + + + + + + number of buckets to use for grouping, -1 (default) is unlimited and uses the raw group, 0 disables message groups. + + + + + + + + key used to mark a message is first in a group for a consumer + + + + + + + + the default number of consumers needed before dispatch can start for queues under the address. + + + + + + + + the default delay (in milliseconds) to wait before dispatching if number of consumers before + dispatch is not met for queues under the address. + + + + + + + + how long (in ms) to wait after the last consumer is closed on a queue before redistributing + messages. + + + + + + + + if there are no queues matching this address, whether to forward message to DLA (if it exists for + this address) + + + + + + + + The minimum rate of message consumption allowed before a consumer is considered "slow." Measurement + unit is defined by the slow-consumer-threshold-measurement-unit parameter. By default this is + messages-per-seconds + + + + + + + + The units used to measure the slow consumer threshold. Default is messages-per-second. + + + + + + + + + + + + + + + + what happens when a slow consumer is identified + + + + + + + + + + + + + + How often to check for slow consumers on a particular queue. Measured in seconds. + + + + + + + + DEPRECATED: whether or not to automatically create JMS queues when a producer sends or a consumer connects to a + queue + + + + + + + + DEPRECATED: whether or not to delete auto-created JMS queues when the queue has 0 consumers and 0 messages + + + + + + + + DEPRECATED: whether or not to automatically create JMS topics when a producer sends or a consumer subscribes to + a topic + + + + + + + + DEPRECATED: whether or not to delete auto-created JMS topics when the last subscription is closed + + + + + + + + whether or not to automatically create a queue when a client sends a message to or attempts to consume + a message from a queue + + + + + + + + whether or not to delete auto-created queues when the queue has 0 consumers and 0 messages + + + + + + + + whether or not to delete created queues when the queue has 0 consumers and 0 messages + + + + + + + + how long to wait (in milliseconds) before deleting auto-created queues after the queue has 0 + consumers. + + + + + + + + the message count the queue must be at or below before it can be evaluated to be auto deleted, 0 waits until empty queue (default) and -1 disables this check. + + + + + + + + whether or not to check that the queue has actually be used before auto-deleting it + + + + + + + + What to do when a queue is no longer in broker.xml. + OFF = will do nothing queues will remain, + FORCE = delete queues even if messages remaining. + + + + + + + + + + + + + + whether or not to automatically create addresses when a client sends a message to or attempts to + consume a message from a queue mapped to an address that doesn't exist + + + + + + + + whether or not to delete auto-created addresses when it no longer has any queues + + + + + + + + how long to wait (in milliseconds) before deleting auto-created addresses after they no longer + have any queues + + + + + + + + whether or not to check that the address has actually be used before auto-deleting it + + + + + + + + What to do when an address is no longer in broker.xml. + OFF = will do nothing addresses will remain, + FORCE = delete address and its queues even if messages remaining. + + + + + + + + + + + + + + What to do when a divert is no longer in broker.xml. + OFF = will do nothing queues will remain, + FORCE = delete queues even if messages remaining. + + + + + + + + + + + + + + how many message a management resource can browse, list or filter + + + + + + + + the size limit of any message attribute value returned from a browse ,list or filter. Attribute values that exceed with be truncated + + + + + + + + purge the contents of the queue once there are no consumers + + + + + + + + the maximum number of consumers allowed on this queue at any one time + + + + + + + + the routing-type used on auto-created queues + + + + + + + + the routing-type used on auto-created addresses + + + + + + + + the default window size for a consumer + + + + + + + + the default ring-size value for any matching queue which doesn't have `ring-size` explicitly + defined + + + + + + + + the number of messages to preserve for future queues created on the matching address + + + + + + + + whether or not to enable metrics for metrics plugins on the matching address + + + + + + + + whether or not the broker should set its own timestamp on incoming messages to the matching address + + + + + + + + This will set the Duplicate ID cache size for the matching address. By default the global + setting for `id-cache-size` will be used. + + + + + + + + + + pattern for matching settings against addresses; can use wildards + + + + + + + + + + + a list of resource limit settings + + + + + + + + + + + + + + Complex type element to configure resource limits for a particular user. + + + + + + + how many connections are allowed by the matched user (-1 means no limit, default is -1) + + + + + + + + how many queues can be created by the matched user (-1 means no limit, default is -1) + + + + + + + + + the name of the user to whom the limits should be applied + + + + + + + + + + + optional core filter expression (set through attribute) + + + + + + optional core filter expression + + + + + + + + + + + a list of connector services + + + + + + + + + + + + + + + + Name of the factory class of the ConnectorService + + + + + + + + + name of the connector service + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + a list of pre configured queues to create + + + + + + + + + + + + + a list of pre configured queues to create + + + + + + + + + + + + + + The address name to match incoming message addresses + + + + + + + + + + + a list of remoting connectors configurations to create + + + + + + + + + + + + + + a list of remoting acceptors to create + + + + + + + + + + + + + + + a list of security settings + + + + + + + + + + a permission to add to the matched addresses + + + + + + + + + the type of permission + + + + + + + a comma-separated list of roles to apply the permission to + + + + + + + + + + + pattern for matching security roles against addresses; can use wildcards + + + + + + + + + + + a plugin + + + + + + + + + the name of the setting + + + + + + + the value for the setting + + + + + + + + + + + the name of the plugin class to instantiate + + + + + + + + + + + + + the name of the external role + + + + + + + the comma delimited name of the internal role(s) + + + + + + + + + + + + + + + + a list of broker-plugins + + + + + + + + + a broker plugin + + + + + + + properties to configure a plugin + + + + + + + + the name of the broker plugin class to instantiate + + + + + + + + + + + + + + + + metrics configuration + + + + + + + + whether or not to report JVM memory metrics + + + + + + + + whether or not to report JVM thread metrics + + + + + + + + whether or not to report JVM GC metrics + + + + + + + + whether or not to report Netty pool metrics + + + + + + + + whether or not to report file descriptor metrics + + + + + + + + whether or not to report processor metrics + + + + + + + + whether or not to report uptime metrics + + + + + + + + whether or not to report logging metrics + + + + + + + + whether to report metrics for the authentication and authorization caches + + + + + + + + + a metrics plugin + + + + + + + properties to configure a plugin + + + + + + + + the name of the metrics plugin class to instantiate + + + + + + + + + + + + + + + + a list of addresses + + + + + + + + + + + + + + parameters to configure wildcard address matching format + + + + + + Complex type element to configure wildcard address format. + + + + + + + deprecated please use routing-enabled. + + + + + + + is wildcard addresses routing enabled. + + + + + + + wildcard address parts delimiter. Default '.' + + + + + + + wildcard address any words character. Default '#' + + + + + + + wildcard address single word character. Default '*' + + + + + + + + + diff --git a/roles/activemq/tasks/configure_files.yml b/roles/activemq/tasks/configure_files.yml index eeee88d..8095df5 100644 --- a/roles/activemq/tasks/configure_files.yml +++ b/roles/activemq/tasks/configure_files.yml @@ -36,8 +36,8 @@ become: true middleware_automation.common.xml: path: "{{ activemq.instance_home }}/etc/bootstrap.xml" - xpath: "{{ '/b:broker/b:web/b:binding' if amq_broker_enable is defined else '/b:broker/b:web' }}" - attribute: "{{ 'uri' if amq_broker_enable is defined else 'bind' }}" + xpath: '/b:broker/b:web/b:binding' + attribute: uri value: "http{{ 's' if activemq_tls_enabled else '' }}://{{ activemq_host }}:{{ activemq_http_port }}" namespaces: b: http://activemq.apache.org/schema diff --git a/roles/activemq/tasks/upgrade.yml b/roles/activemq/tasks/upgrade.yml index 165147c..3097040 100644 --- a/roles/activemq/tasks/upgrade.yml +++ b/roles/activemq/tasks/upgrade.yml @@ -20,10 +20,10 @@ become: true - name: "Ensure bootstrap xsd namespace {{ activemq_xsd.matches[0]['{http://www.w3.org/2001/XMLSchema}schema'].targetNamespace }} is correct for instance {{ activemq.instance_name }}" - ansible.builtin.lineinfile: + ansible.builtin.replace: path: "{{ activemq.instance_home }}/etc/bootstrap.xml" - regexp: '' - line: "" + regexp: '(?<=