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

Wildcards for addresses on Federation feature not working properly

XMLWordPrintable

    • False
    • None
    • False
    • Hide

      There is an attached zip file containing a script and files, please proceed as follows:
      1) Unzip the script

      2) Change the variables at the beginning of the script, to point to your amq broker installation

      3) Execute the script
      $ ./reproduce.sh

      The script executes the following steps:

      A) Creates two brokers on the same machine, with the already configured federation with wildcard "test.#"

      • downstream, port offset 0
      • upstream, port offset 1000 

      B) Send a message to upstream broker destination "test.normal", and shows the results on the downstream broker

      C) Send a message to upstream broker destination "test.normal", and shows the results on the downstream broker

      Show
      There is an attached zip file containing a script and files, please proceed as follows: 1) Unzip the script 2) Change the variables at the beginning of the script, to point to your amq broker installation 3) Execute the script $ ./reproduce.sh The script executes the following steps: A) Creates two brokers on the same machine, with the already configured federation with wildcard "test.#" downstream, port offset 0 upstream, port offset 1000  B) Send a message to upstream broker destination "test.normal", and shows the results on the downstream broker C) Send a message to upstream broker destination "test.normal", and shows the results on the downstream broker

      The wildcards are not working as expected when using Federation.

      Consider the following configuration, having "test.#" as a wildcard

       
      <federation name="to-upstream"user="admin"password="admin">
        <upstream name="upstream-1">
          <static-connectors>
            <connector-ref>upstream-connector</connector-ref>
          </static-connectors>
        <policyref="test-address-federation"/>
        </upstream>
        <address-policyname="test-address-federation"auto-delete="true"auto-delete-delay="300000"auto-delete-message-count="-1"enable-divert-bindings="false"max-hops="1">
          <include address-match="test.#"/>
        </address-policy> 
      </federation>
       
      When the downstream broker has an address "test.normal",  a Federation link is created on the upstream broker for this address. When I send messages to the upstream broker, the downstream broker gets them as expected.
      However, I also see a link created for the address "testing.normal" , and this also gets messages from the upstream broker, despite the "testing.normal" address does not comply with the wilcard "test.#"

      $ upstream/bin/artemis queue stat --field ADDRESS --operation CONTAINS --value test
      Connection brokerURL = tcp://localhost:62616
      |NAME                     |ADDRESS       |CONSUMER_COUNT|MESSAGE_COUNT|MESSAGES_ADDED|DELIVERING_COUNT|MESSAGES_ACKED|SCHEDULED_COUNT|ROUTING_TYPE|
      |federated.to-upstream....|test.normal   |1             |1            |1             |1               |0             |0              |MULTICAST   |
      |federated.to-upstream....|testing.normal|1             |1            |1             |1               |0             |0              |MULTICAST   |
       

            gtully@redhat.com Gary Tully
            rhn-support-anarvaez Alfredo Narvaez
            Mikhail Krutov Mikhail Krutov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: