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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Out of Date
    • A-MQ 7.0.0.ER15, A-MQ 7.0.0.ER16
    • None
    • None
    • None
    • Documentation (Ref Guide, User Guide, etc.)
    • 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.
    • Documented as Known Issue

    Description

      Updated bug reproducer (same as my comment below, but better in description):
      After some talk with mtaylor1@redhat.com 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
      

      Attachments

        Issue Links

          Activity

            People

              mtaylor1@redhat.com Martyn Taylor (Inactive)
              mtoth@redhat.com Michal Toth
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: