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

Feature Last-Value Queue is not working with AMQP protocol

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: A-MQ 7.0.0.ER17
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:

      A-MQ7-7.0.0-SNAPSHOT-2017-03-22

    • Target Release:
    • Steps to Reproduce:
      Hide

      Set up broker.xml accordingly

       <address-settings>
               <!-- if you define auto-create on certain queues, management has to be auto-create -->
               <address-setting match="activemq.management#">
                  <dead-letter-address>DLQ</dead-letter-address>
                  <expiry-address>ExpiryQueue</expiry-address>
                  <redelivery-delay>0</redelivery-delay>
                  <!-- with -1 only the global-max-size is in use for limiting -->
                  <max-size-bytes>-1</max-size-bytes>
                  <message-counter-history-day-limit>10</message-counter-history-day-limit>
                  <address-full-policy>PAGE</address-full-policy>
                  <auto-create-queues>true</auto-create-queues>
                  <auto-create-addresses>true</auto-create-addresses>
                  <auto-create-jms-queues>true</auto-create-jms-queues>
                  <auto-create-jms-topics>true</auto-create-jms-topics>
               </address-setting>
      
      	 <address-setting match="lvq">
      	    <last-value-queue>true</last-value-queue>
      	 </address-setting>
      
               <!--default for catch all-->
               <address-setting match="#">
                  <dead-letter-address>DLQ</dead-letter-address>
                  <expiry-address>ExpiryQueue</expiry-address>
                  <redelivery-delay>0</redelivery-delay>
                  <!-- with -1 only the global-max-size is in use for limiting -->
                  <max-size-bytes>-1</max-size-bytes>
                  <message-counter-history-day-limit>10</message-counter-history-day-limit>
                  <address-full-policy>PAGE</address-full-policy>
                  <auto-create-queues>true</auto-create-queues>
                  <auto-create-addresses>true</auto-create-addresses>
                  <auto-create-jms-queues>true</auto-create-jms-queues>
                  <auto-create-jms-topics>true</auto-create-jms-topics>
               </address-setting>
            </address-settings>
      
            <addresses>
               <address name="DLQ">
                  <anycast>
                     <queue name="DLQ" />
                  </anycast>
               </address>
               <address name="ExpiryQueue">
                  <anycast>
                     <queue name="ExpiryQueue" />
                  </anycast>
               </address>
               <address name="lvq">
                  <anycast>
                     <queue name="lvq" />
                  </anycast>
               </address>
            </addresses>
      

      2) Send some messages with expected "_AMQ_LVQ_NAME" string property

      $ java  -jar /var/dtests/node_data/clients/aoc7.jar sender --log-msgs dict  --conn-username admin --conn-password admin --address lvq --count 1 --msg-property "_AMQ_LVQ_NAME=1st"  
      {'redelivered': False, 'reply_to': None, 'id': 'dhcp-lab-215.englab.brq.redhat.com-41150-1490957078570-1:1:1:1:1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490957079048, 'address': 'queue://lvq', 'properties': {'_AMQ_LVQ_NAME': '1st'}, 'content': None}
      
      [0,root@mt_r6x0 ~]$ java  -jar /var/dtests/node_data/clients/aoc7.jar sender --log-msgs dict  --conn-username admin --conn-password admin --address lvq --count 1 --msg-property "_AMQ_LVQ_NAME=2ndOW"  
      {'redelivered': False, 'reply_to': None, 'id': 'dhcp-lab-215.englab.brq.redhat.com-43836-1490957085667-1:1:1:1:1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490957085944, 'address': 'queue://lvq', 'properties': {'_AMQ_LVQ_NAME': '2ndOW'}, 'content': None}
      
      [0,root@mt_r6x0 ~]$ java  -jar /var/dtests/node_data/clients/aoc7.jar sender --log-msgs dict  --conn-username admin --conn-password admin --address lvq --count 1 --msg-property "_AMQ_LVQ_NAME=3rdOW"  
      {'redelivered': False, 'reply_to': None, 'id': 'dhcp-lab-215.englab.brq.redhat.com-34409-1490957091498-1:1:1:1:1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490957091743, 'address': 'queue://lvq', 'properties': {'_AMQ_LVQ_NAME': '3rdOW'}, 'content': None}
      

      3) Receive 3 messages (all should have "3rdOW" content) - NOK -> got 3 distinct orignal messages

       java  -jar /var/dtests/node_data/clients/aoc7.jar receiver  --timeout 1 --log-msgs dict  --conn-username admin --conn-password admin --address lvq  --count 3 
      {'redelivered': False, 'reply_to': None, 'id': 'dhcp-lab-215.englab.brq.redhat.com-41150-1490957078570-1:1:1:1:1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490957079048, 'address': 'queue://lvq', 'properties': {'_AMQ_LVQ_NAME': '1st'}, 'content': None}
      {'redelivered': False, 'reply_to': None, 'id': 'dhcp-lab-215.englab.brq.redhat.com-43836-1490957085667-1:1:1:1:1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490957085944, 'address': 'queue://lvq', 'properties': {'_AMQ_LVQ_NAME': '2ndOW'}, 'content': None}
      {'redelivered': False, 'reply_to': None, 'id': 'dhcp-lab-215.englab.brq.redhat.com-34409-1490957091498-1:1:1:1:1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490957091743, 'address': 'queue://lvq', 'properties': {'_AMQ_LVQ_NAME': '3rdOW'}, 'content': None}
      

      I have also tried to not touch "_AMQ_LVQ_NAME" at all, but it failed in the same way.

      [0,root@mt_r6x0 ~]$ java  -jar /var/dtests/node_data/clients/aac1.jar sender --log-msgs dict  --conn-username admin --conn-password admin --address lvq --count 1 --msg-content "first"  --broker localhost:5672
      {'redelivered': False, 'reply_to': None, 'id': '3e05e588-1e85-4730-a616-cb85786cf415:1:1:1-1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490956792355, 'address': 'lvq', 'properties': {'JMSXDeliveryCount': 1}, 'content': 'first'}
      [0,root@mt_r6x0 ~]$ 
      
      [0,root@mt_r6x0 ~]$ java  -jar /var/dtests/node_data/clients/aac1.jar sender --log-msgs dict  --conn-username admin --conn-password admin --address lvq --count 1 --msg-content "2nd"  --broker localhost:5672
      {'redelivered': False, 'reply_to': None, 'id': '56c26a3f-4951-4d6d-b1e8-0c8971e27dcc:1:1:1-1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490956804827, 'address': 'lvq', 'properties': {'JMSXDeliveryCount': 1}, 'content': '2nd'}
      
      [0,root@mt_r6x0 ~]$ java  -jar /var/dtests/node_data/clients/aac1.jar sender --log-msgs dict  --conn-username admin --conn-password admin --address lvq --count 1 --msg-content "3rd"  --broker localhost:5672
      {'redelivered': False, 'reply_to': None, 'id': '206e4d91-0966-446a-a2fa-7408abe70610:1:1:1-1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490956811837, 'address': 'lvq', 'properties': {'JMSXDeliveryCount': 1}, 'content': '3rd'}
      
      
      [0,root@mt_r6x0 ~]$ java  -jar /var/dtests/node_data/clients/aac1.jar receiver  --timeout 1 --log-msgs dict --broker 10.34.33.215:5672 --conn-username admin --conn-password admin --address lvq  --count 3
      {'redelivered': False, 'reply_to': None, 'id': '3e05e588-1e85-4730-a616-cb85786cf415:1:1:1-1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490956792355, 'address': 'lvq', 'properties': {'JMSXDeliveryCount': 1}, 'content': 'first'}
      {'redelivered': False, 'reply_to': None, 'id': '56c26a3f-4951-4d6d-b1e8-0c8971e27dcc:1:1:1-1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490956804827, 'address': 'lvq', 'properties': {'JMSXDeliveryCount': 1}, 'content': '2nd'}
      {'redelivered': False, 'reply_to': None, 'id': '206e4d91-0966-446a-a2fa-7408abe70610:1:1:1-1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490956811837, 'address': 'lvq', 'properties': {'JMSXDeliveryCount': 1}, 'content': '3rd'}
      
      Show
      Set up broker.xml accordingly <address-settings> <!-- if you define auto-create on certain queues, management has to be auto-create --> <address-setting match= "activemq.management#" > <dead-letter-address> DLQ </dead-letter-address> <expiry-address> ExpiryQueue </expiry-address> <redelivery-delay> 0 </redelivery-delay> <!-- with -1 only the global-max-size is in use for limiting --> <max-size-bytes> -1 </max-size-bytes> <message-counter-history-day-limit> 10 </message-counter-history-day-limit> <address-full-policy> PAGE </address-full-policy> <auto-create-queues> true </auto-create-queues> <auto-create-addresses> true </auto-create-addresses> <auto-create-jms-queues> true </auto-create-jms-queues> <auto-create-jms-topics> true </auto-create-jms-topics> </address-setting> <address-setting match= "lvq" > <last-value-queue> true </last-value-queue> </address-setting> <!--default for catch all--> <address-setting match= "#" > <dead-letter-address> DLQ </dead-letter-address> <expiry-address> ExpiryQueue </expiry-address> <redelivery-delay> 0 </redelivery-delay> <!-- with -1 only the global-max-size is in use for limiting --> <max-size-bytes> -1 </max-size-bytes> <message-counter-history-day-limit> 10 </message-counter-history-day-limit> <address-full-policy> PAGE </address-full-policy> <auto-create-queues> true </auto-create-queues> <auto-create-addresses> true </auto-create-addresses> <auto-create-jms-queues> true </auto-create-jms-queues> <auto-create-jms-topics> true </auto-create-jms-topics> </address-setting> </address-settings> <addresses> <address name= "DLQ" > <anycast> <queue name= "DLQ" /> </anycast> </address> <address name= "ExpiryQueue" > <anycast> <queue name= "ExpiryQueue" /> </anycast> </address> <address name= "lvq" > <anycast> <queue name= "lvq" /> </anycast> </address> </addresses> 2) Send some messages with expected "_AMQ_LVQ_NAME" string property $ java -jar /var/dtests/node_data/clients/aoc7.jar sender --log-msgs dict --conn-username admin --conn-password admin --address lvq --count 1 --msg-property "_AMQ_LVQ_NAME=1st" {'redelivered': False, 'reply_to': None, 'id': 'dhcp-lab-215.englab.brq.redhat.com-41150-1490957078570-1:1:1:1:1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490957079048, 'address': 'queue://lvq', 'properties': {'_AMQ_LVQ_NAME': '1st'}, 'content': None} [0,root@mt_r6x0 ~]$ java -jar /var/dtests/node_data/clients/aoc7.jar sender --log-msgs dict --conn-username admin --conn-password admin --address lvq --count 1 --msg-property "_AMQ_LVQ_NAME=2ndOW" {'redelivered': False, 'reply_to': None, 'id': 'dhcp-lab-215.englab.brq.redhat.com-43836-1490957085667-1:1:1:1:1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490957085944, 'address': 'queue://lvq', 'properties': {'_AMQ_LVQ_NAME': '2ndOW'}, 'content': None} [0,root@mt_r6x0 ~]$ java -jar /var/dtests/node_data/clients/aoc7.jar sender --log-msgs dict --conn-username admin --conn-password admin --address lvq --count 1 --msg-property "_AMQ_LVQ_NAME=3rdOW" {'redelivered': False, 'reply_to': None, 'id': 'dhcp-lab-215.englab.brq.redhat.com-34409-1490957091498-1:1:1:1:1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490957091743, 'address': 'queue://lvq', 'properties': {'_AMQ_LVQ_NAME': '3rdOW'}, 'content': None} 3) Receive 3 messages (all should have "3rdOW" content) - NOK -> got 3 distinct orignal messages java -jar /var/dtests/node_data/clients/aoc7.jar receiver --timeout 1 --log-msgs dict --conn-username admin --conn-password admin --address lvq --count 3 {'redelivered': False, 'reply_to': None, 'id': 'dhcp-lab-215.englab.brq.redhat.com-41150-1490957078570-1:1:1:1:1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490957079048, 'address': 'queue://lvq', 'properties': {'_AMQ_LVQ_NAME': '1st'}, 'content': None} {'redelivered': False, 'reply_to': None, 'id': 'dhcp-lab-215.englab.brq.redhat.com-43836-1490957085667-1:1:1:1:1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490957085944, 'address': 'queue://lvq', 'properties': {'_AMQ_LVQ_NAME': '2ndOW'}, 'content': None} {'redelivered': False, 'reply_to': None, 'id': 'dhcp-lab-215.englab.brq.redhat.com-34409-1490957091498-1:1:1:1:1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490957091743, 'address': 'queue://lvq', 'properties': {'_AMQ_LVQ_NAME': '3rdOW'}, 'content': None} I have also tried to not touch "_AMQ_LVQ_NAME" at all, but it failed in the same way. [0,root@mt_r6x0 ~]$ java -jar /var/dtests/node_data/clients/aac1.jar sender --log-msgs dict --conn-username admin --conn-password admin --address lvq --count 1 --msg-content "first" --broker localhost:5672 {'redelivered': False, 'reply_to': None, 'id': '3e05e588-1e85-4730-a616-cb85786cf415:1:1:1-1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490956792355, 'address': 'lvq', 'properties': {'JMSXDeliveryCount': 1}, 'content': 'first'} [0,root@mt_r6x0 ~]$ [0,root@mt_r6x0 ~]$ java -jar /var/dtests/node_data/clients/aac1.jar sender --log-msgs dict --conn-username admin --conn-password admin --address lvq --count 1 --msg-content "2nd" --broker localhost:5672 {'redelivered': False, 'reply_to': None, 'id': '56c26a3f-4951-4d6d-b1e8-0c8971e27dcc:1:1:1-1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490956804827, 'address': 'lvq', 'properties': {'JMSXDeliveryCount': 1}, 'content': '2nd'} [0,root@mt_r6x0 ~]$ java -jar /var/dtests/node_data/clients/aac1.jar sender --log-msgs dict --conn-username admin --conn-password admin --address lvq --count 1 --msg-content "3rd" --broker localhost:5672 {'redelivered': False, 'reply_to': None, 'id': '206e4d91-0966-446a-a2fa-7408abe70610:1:1:1-1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490956811837, 'address': 'lvq', 'properties': {'JMSXDeliveryCount': 1}, 'content': '3rd'} [0,root@mt_r6x0 ~]$ java -jar /var/dtests/node_data/clients/aac1.jar receiver --timeout 1 --log-msgs dict --broker 10.34.33.215:5672 --conn-username admin --conn-password admin --address lvq --count 3 {'redelivered': False, 'reply_to': None, 'id': '3e05e588-1e85-4730-a616-cb85786cf415:1:1:1-1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490956792355, 'address': 'lvq', 'properties': {'JMSXDeliveryCount': 1}, 'content': 'first'} {'redelivered': False, 'reply_to': None, 'id': '56c26a3f-4951-4d6d-b1e8-0c8971e27dcc:1:1:1-1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490956804827, 'address': 'lvq', 'properties': {'JMSXDeliveryCount': 1}, 'content': '2nd'} {'redelivered': False, 'reply_to': None, 'id': '206e4d91-0966-446a-a2fa-7408abe70610:1:1:1-1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490956811837, 'address': 'lvq', 'properties': {'JMSXDeliveryCount': 1}, 'content': '3rd'}
    • Affects:
      Release Notes, Compatibility/Configuration, User Experience
    • Release Notes Text:
      The Last Value Queue feature does not work with the AMQP protocol. This feature should not be used when using AMQP clients.
    • Release Notes Docs Status:
      Documented as Resolved Issue

      Description

      Feature Last-Value Queue is not working as expected.
      I have tried it with both JMS AMQP & Openwire with the same results.
      I would expect only the last message to be received N times, instead of N send messages, which were different.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ataylor Andy Taylor
                  Reporter:
                  mtoth Michal Toth
                  Tester:
                  Michal Toth
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: