[AMQ7] Exclusive Queues behaviour in clustered environment

Solution Verified - Updated -

Issue

  • How Exclusive Queues will behave in a clustered environment?

  • Created AMQ Broker cluster with two instances. [i.e., Broker_POD1 & Broker_POD2]

  • Created an exclusive queue [i.e., queue://TEST/EXCLUSIVE_QUEUE]

  • Execute the commands in the exact order:

    1. Send "Test1" to queue://TEST/EXCLUSIVE_QUEUE@Broker_POD1
    ./artemis producer --url tcp://<Broker_POD1_IP>:61616 --user <username> --password <password> --destination 
    queue://TEST/EXCLUSIVE_QUEUE --message-count 1 --message Test1
    
    2. Send "Test2" to queue://TEST/EXCLUSIVE_QUEUE@Broker_POD2
    ./artemis producer --url tcp://<Broker_POD2_IP>:61616 --user <username> --password <password> --destination 
    queue://TEST/EXCLUSIVE_QUEUE --message-count 1 --message Test2
    
    3. Send "Test3" to queue://TEST/EXCLUSIVE_QUEUE@Broker_POD1
    ./artemis producer --url tcp://<Broker_POD1_IP>:61616 --user <username> --password <password> --destination 
    queue://TEST/EXCLUSIVE_QUEUE --message-count 1 --message Test3
    
    4. Consume 3 messages from queue://TEST/EXCLUSIVE_QUEUE@Broker_POD1 with Single Thread.
    ./artemis consumer --url tcp://<Broker_POD1_IP>:61616 --user <username> --password password> --destination 
    queue://TEST/EXCLUSIVE_QUEUE --message-count 3 --data out.txt
    
  • But messages are received in incorrect order as shown below Test1, Test3 followed by Test2

    • sh-4.4$ cat out.txt:

      Test1
      Test3
      Test2
      Test1
      Test3
      Test2
      

Environment

  • Red Hat AMQ
    • 7.x
  • Red Hat OpenShift
    • 4.10

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content