ansible-middleware / amq

A collection to manage AMQ brokers
Apache License 2.0
19 stars 11 forks source link

Fix `broker-connections` templating error, add missing parameters #133

Closed guidograzioli closed 5 months ago

guidograzioli commented 5 months ago

This changeset tackles the linked issue, and update the configuration with connection username and password.

Multi-site fault-tolerance (AMQP broker connections)

Variable Description Default
activemq_broker_connections AMQP broker connections configuration; list of { name(str),uri(str),operations(list of dicts with type key in [mirror,sender,receiver,peer])) } []

Sample of mirroring operation:

activemq_broker_connections:
  - uri: 'tcp://<hostname>:<port>'
    name: DC2
    sync: true
    operations:
      - type: mirror
        parameters:
          queue_removal: false

Sample for sender-receiver operation:

activemq_broker_connections:
  - uri: 'tcp://<hostname>:<port>?<options>'
    name: other-server
    user: user
    password: password
    operations:
      - type: sender
        parameters:
          address_match: 'queues.#'
      - type: receiver
        parameters:
          address_match: 'remotequeues.#'

Note: operations parameters keys are using underscore (address_match:) instead of dash (address-match:). Dash works only if using single quotes (ie. 'address-match':)

Note: the local queues for remotequeues.# need to be created on this broker.

Fix #126