Uploaded image for project: 'A-MQ Broker'
  1. A-MQ Broker
  2. ENTMQBR-463

Attributes in clustering settings has order restrictions, would be nice to either have better error message or simply ignore the order

    Details

    • Type: Bug
    • Status: Done
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: A-MQ 7.0.0.ER12
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Target Release:
    • Affects:
      Documentation (Ref Guide, User Guide, etc.)
    • Release Notes Text:
      Currently the sequence of the elements in the cluster connection configuration has to be in a specific order. The workaround is to adhere to the order in the configuration schema.
    • Release Notes Docs Status:
      Documented as Known Issue

      Description

      We're configuring clustering connections with 2 more attributes: check-period and connection-ttl following documentation [1]. When adding the attributes, we get an exception and the broker doesn't start. See the configuration below:

            <cluster-connections>
               <cluster-connection name="my-cluster">
                  <address>jms</address>
                  <connector-ref>artemis</connector-ref>
                  <message-load-balancing>ON_DEMAND</message-load-balancing>
                  <max-hops>1</max-hops>
      <check-period>2500</check-period>
      <connection-ttl>5000</connection-ttl>
                  <discovery-group-ref discovery-group-name="dg-group1"/>
               </cluster-connection>
            </cluster-connections>
      

      Exception is:
      19:34:37,219 ERROR [org.apache.activemq.artemis.core.client] AMQ214019: Invalid configuration: org.xml.sax.SAXParseException; cvc-complex-type.2.4.a: Invalid content was found starting with element 'check-period'. One of '

      {"urn:activemq:core":confirmation-window-size, "urn:activemq:core":producer-window-size, "urn:activemq:core":call-failover-timeout, "urn:activemq:core":notification-interval, "urn:activemq:core":notification-attempts, "urn:activemq:core":scale-down-connector, "urn:activemq:core":static-connectors, "urn:activemq:core":discovery-group-ref}

      ' is expected.

      When adding these attributes as following everything works well:

            <cluster-connections>
               <cluster-connection name="my-cluster">
                  <address>jms</address>
                  <connector-ref>artemis</connector-ref>
      <check-period>1000</check-period>
      <connection-ttl>5000</connection-ttl>
                  <message-load-balancing>ON_DEMAND</message-load-balancing>
                  <max-hops>1</max-hops>
                  <discovery-group-ref discovery-group-name="dg-group1"/>
               </cluster-connection>
            </cluster-connections>
      

      Would it be possible to ignore the attribute ordering or improve the exception message?

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jbertram Justin Bertram
                Reporter:
                roger.hui Roger Hui
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: