ansible-middleware / amq

A collection to manage AMQ brokers
Apache License 2.0
16 stars 12 forks source link

Support for federated addressing #134

Closed herbertkb closed 3 months ago

herbertkb commented 3 months ago
SUMMARY

I need to use federated addressing to forward messages between brokers, but the role currently does not support this.

See: https://access.redhat.com/documentation/en-us/red_hat_amq_broker/7.12/html-single/configuring_amq_broker/index#proc-br-configuring-amqp-address-federation_configuring

or https://activemq.apache.org/components/artemis/documentation/latest/federation-address.html

The variable to configure it could follow this pattern, based on the 7.11 XSD definition:

activemq_federations:
  - name: <String>
    protocol: <"AMQP" | "CORE">
    user: <String> [optional]
    password: <String> [optional]
    upstreams:
      - name: <String>
        user: <String> [optional]
        password: <String> [optional]
        priority_adjustment: <String> [optional]
        discovery_group_ref: <String> [optional]
        static_connectors: <List of Strings> [optional]
        policies: <List of String> [optional]
        parameters: <Dict> [optional]
    downstreams:
      - name: <String>
        user: <String> [optional]
        password: <String> [optional]
        priority_adjustment: <String> [optional]
        upstream_connector_ref: <String> [optional]
        discovery_group_ref: <String>  [optional]
        static_connectors: <List of Strings>  [optional]
        policies: <List of String>  [optional]
        parameters: <Dict>  [optional]
    policy_sets:  [optional]
      - name: <name>
        policies:
        - <policy_ref_A>
        - <policy_ref_B>
    queue_policies: [optional]
      - name: <policy_name>
         includes:
            - queue_match: <String>
               address_match: <String>
         excludes:
            - queue_match: <String>
               address_match: <String>
        parameters: <Dict>  [optional]            
    address_policies:  [optional]
      - name: <String>
         includes: <List of String>
         excludes: <List of String>
         parameters: <Dict>
    transformers:  [optional]
      - name: <String>
        class_name: <String>
        properties:
          - key: <String>
            value: <String>
ISSUE TYPE
herbertkb commented 3 months ago

We have a partial implementation for the CORE style federations element, but had to drop it to focus on other things: https://github.com/ansible-middleware/amq/pull/137

Would be very thankful if you continue to push it over the finish line.

herbertkb commented 3 months ago

I have the feature implemented on #137 but the molecule tests are failing and I don't know that tool well enough to see why.

guidograzioli commented 3 months ago

updated and merged #137