Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-8598

broker.properties address configuration with '*' wildcard causes incorrect/overridden values

XMLWordPrintable

      In the following broker.properties

      addressSettings.*.maxRedeliveryDelay=999999
      addressSettings.\"foo-a.#\".maxExpiryDelay=60000
      addressSettings.\"foo-b.#\".maxExpiryDelay=120000
      addressConfigurations.foo-a.queueConfigs.\"foo-a-queue\".address=foo-a
      addressConfigurations.foo-a.routingTypes=MULTICAST
      addressConfigurations.foo-b.queueConfigs.\"foo-b-queue\".address=foo-b
      addressConfigurations.foo-b.routingTypes=MULTICAST
      

      The observed maxExpiryDelay for both `foo-a` and `foo-b` is 120000 (or 60000). If the first line for the (unrelated) maxRedeliveryDelay is commented out, the maxExpiryDelay for foo-a is 60000 and the maxExpiryDelay for `foo-b` is 120000.

      Test script for demonstration purposes:

      $ cat test.sh 
      #!/bin/bash
      
      echo "foo-a:"
      curl -s --user admin:admin -H "Origin: http://localhost" "http://localhost:8161/console/jolokia/exec/org.apache.activemq.artemis:broker=%220.0.0.0%22/getAddressSettingsAsJSON(java.lang.String)/foo-a" | jq .value | sed 's/\\"/\"/g' | sed 's/^.\(.*\).$/\1/' | jq '{maxExpiryDelay,maxRedeliveryDelay}'
      
      echo "foo-b:"
      curl -s --user admin:admin -H "Origin: http://localhost" "http://localhost:8161/console/jolokia/exec/org.apache.activemq.artemis:broker=%220.0.0.0%22/getAddressSettingsAsJSON(java.lang.String)/foo-b" | jq .value | sed 's/\\"/\"/g' | sed 's/^.\(.*\).$/\1/' | jq '{maxExpiryDelay,maxRedeliveryDelay}'
      

      Example output with `addressSettings.*.maxRedeliveryDelay=999999`

      $ ./test.sh 
      foo-a:
      {
        "maxExpiryDelay": 60000,
        "maxRedeliveryDelay": 999999
      }
      foo-b:
      {
        "maxExpiryDelay": 60000,
        "maxRedeliveryDelay": 999999
      }
      

      Example output without addressSettings.*.maxRedeliveryDelay=999999:

      $ ./test.sh 
      foo-a:
      {
        "maxExpiryDelay": 60000,
        "maxRedeliveryDelay": 0
      }
      foo-b:
      {
        "maxExpiryDelay": 120000,
        "maxRedeliveryDelay": 0
      }
      

              dbruscin Domenico Francesco Bruscino
              rhn-support-shiggs Stephen Higgs
              Messaging QE Messaging QE
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: