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

Receiving from address named same as queue bound to other address should not be allowed

    Details

    • Type: Bug
    • Status: New
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: A-MQ 7.0.0.ER15, A-MQ 7.0.0.ER16
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      A-MQ7-7.0.0.ER15

    • Target Release:
    • Affects:
      Documentation (Ref Guide, User Guide, etc.)
    • Release Notes Text:
      Hide
      A queue with the same name as an address must only be assigned to address. Creating a queue with the same name as an existing address, but bound to an address with a different name, is an invalid configuration. Doing so can result in incorrect messages being routed to the queue.
      Show
      A queue with the same name as an address must only be assigned to address. Creating a queue with the same name as an existing address, but bound to an address with a different name, is an invalid configuration. Doing so can result in incorrect messages being routed to the queue.
    • Release Notes Docs Status:
      Documented as Known Issue

      Description

      Updated bug reproducer (same as my comment below, but better in description):
      After some talk with Martyn Taylor we got into conclusion, that there is a bug associated with address named same as queue bound to different address (different name).

      Consumers incorrectly receive messages sent to an address, different to what the consumer subscribed to. This happens when another address has been configured with a queue that has the same name as the consumer address.

      Address | Queue
      foo          bar
      

      Sender sends msgs to address foo, messages end up in "bar". OK

      Address | Queue
      foo          bar (msgs)
      

      Receiver receives from address "bar" (not existing at this moment), the address is created, but messages are consumed from "foo::bar" queue. This behavior should not be allowed.

      Address | Queue
      foo          bar (msgs consumed)
      bar       ---^^ 
      

      1) Update broker.xml

      <address name="test_queue_address">
        <anycast>
          <queue name="test_queue_address_qname"/>
        </anycast>
      </address>
      

      2) Send a message to the address
      Send message to address - OK

      java  -jar /var/dtests/node_data/clients/aac1.jar sender  --log-msgs dict --broker <host-ip>:5672 --conn-username admin --conn-password admin --address "test_queue_address" --count 1
      

      3) Receive message from queue - NOK
      Message is received, but address is created with same name by this receiver call in case auto-create is turned on.

      java  -jar /var/dtests/node_data/clients/aac1.jar receiver  --log-msgs dict --broker <host-ip>:5672 --conn-username admin --conn-password admin --address "test_queue_address_qname" --count 1
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  martyn-taylor Martyn Taylor
                  Reporter:
                  mtoth Michal Toth
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated: