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

Feature Last-Value Queue is not working with Core protocol

    Details

    • 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>
      

      Nope, it's not working with Core client as well. Very same situation. I have tried both ways of doing it.

      3 senders
      [1,root@mt_r6x0 clients]$ java -jar java/acc/target/acc.jar  sender --log-msgs dict  --conn-username admin --conn-password admin --address lvq --count 1 --msg-content "first"  --broker localhost:61616
      {'redelivered': False, 'reply_to': None, 'id': '95584f01-161b-11e7-a79d-c5e7e8848411', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490969338361, 'address': 'ActiveMQQueue[lvq]', 'properties': {'JMSXDeliveryCount': '0'}, 'content': 'first'}
      [0,root@mt_r6x0 clients]$ 
      [0,root@mt_r6x0 clients]$ java -jar java/acc/target/acc.jar  sender --log-msgs dict  --conn-username admin --conn-password admin --address lvq --count 1 --msg-content "second"  --broker localhost:61616
      {'redelivered': False, 'reply_to': None, 'id': '99df0fe0-161b-11e7-bf8f-97ddf40d6bbe', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490969345955, 'address': 'ActiveMQQueue[lvq]', 'properties': {'JMSXDeliveryCount': '0'}, 'content': 'second'}
      [0,root@mt_r6x0 clients]$ 
      [0,root@mt_r6x0 clients]$ 
      [0,root@mt_r6x0 clients]$ java -jar java/acc/target/acc.jar  sender --log-msgs dict  --conn-username admin --conn-password admin --address lvq --count 1 --msg-content "third"  --broker localhost:61616
      {'redelivered': False, 'reply_to': None, 'id': '9d4fcc15-161b-11e7-a4be-859459bc8539', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490969351727, 'address': 'ActiveMQQueue[lvq]', 'properties': {'JMSXDeliveryCount': '0'}, 'content': 'third'}
      
      
      Receiver of 3 (should be identical) messages
      [0,root@mt_r6x0 java]$ java -jar acc/target/acc.jar  receiver --log-msgs dict  --conn-username admin --conn-password admin --address queue://lvq --count 3  --broker localhost:61616
      {'redelivered': False, 'reply_to': None, 'id': '95584f01-161b-11e7-a79d-c5e7e8848411', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490969338361, 'address': 'org.apache.activemq.artemis.jms.client.ActiveMQDestination@691370ec', 'properties': {'JMSXDeliveryCount': '1'}, 'content': 'first'}
      {'redelivered': False, 'reply_to': None, 'id': '99df0fe0-161b-11e7-bf8f-97ddf40d6bbe', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490969345955, 'address': 'org.apache.activemq.artemis.jms.client.ActiveMQDestination@691370ec', 'properties': {'JMSXDeliveryCount': '1'}, 'content': 'second'}
      {'redelivered': False, 'reply_to': None, 'id': '9d4fcc15-161b-11e7-a4be-859459bc8539', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490969351727, 'address': 'org.apache.activemq.artemis.jms.client.ActiveMQDestination@691370ec', 'properties': {'JMSXDeliveryCount': '1'}, 'content': 'third'}
      

      Let's try with "_AMQ_LVQ_NAME" (same problem)

      [1,root@mt_r6x0 java]$ java -jar acc/target/acc.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': '6739e7b9-161d-11e7-b3ee-52540142d03a', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490970119977, 'address': 'ActiveMQQueue[lvq]', 'properties': {'_AMQ_LVQ_NAME': '1st', 'JMSXDeliveryCount': '0'}, 'content': None}
      
      [0,root@mt_r6x0 java]$ java -jar acc/target/acc.jar  sender --log-msgs dict  --conn-username admin --conn-password admin --address lvq --count 1 --msg-property "_AMQ_LVQ_NAME=2nd"
      {'redelivered': False, 'reply_to': None, 'id': '6a8ff028-161d-11e7-bb39-52540142d03a', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490970125574, 'address': 'ActiveMQQueue[lvq]', 'properties': {'_AMQ_LVQ_NAME': '2nd', 'JMSXDeliveryCount': '0'}, 'content': None}
      
      [0,root@mt_r6x0 java]$ java -jar acc/target/acc.jar  sender --log-msgs dict  --conn-username admin --conn-password admin --address lvq --count 1 --msg-property "_AMQ_LVQ_NAME=3rd"
      {'redelivered': False, 'reply_to': None, 'id': '6e03e16e-161d-11e7-a156-52540142d03a', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490970131368, 'address': 'ActiveMQQueue[lvq]', 'properties': {'_AMQ_LVQ_NAME': '3rd', 'JMSXDeliveryCount': '0'}, 'content': None}
      
      [0,root@mt_r6x0 java]$ java -jar acc/target/acc.jar  receiver --log-msgs dict  --conn-username admin --conn-password admin --address queue://lvq --count 3  --broker localhost:61616
      {'redelivered': False, 'reply_to': None, 'id': '6739e7b9-161d-11e7-b3ee-52540142d03a', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490970119977, 'address': 'ActiveMQQueue[lvq]', 'properties': {'_AMQ_LVQ_NAME': '1st', 'JMSXDeliveryCount': '1'}, 'content': None}
      {'redelivered': False, 'reply_to': None, 'id': '6a8ff028-161d-11e7-bb39-52540142d03a', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490970125574, 'address': 'ActiveMQQueue[lvq]', 'properties': {'_AMQ_LVQ_NAME': '2nd', 'JMSXDeliveryCount': '1'}, 'content': None}
      {'redelivered': False, 'reply_to': None, 'id': '6e03e16e-161d-11e7-a156-52540142d03a', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490970131368, 'address': 'ActiveMQQueue[lvq]', 'properties': {'_AMQ_LVQ_NAME': '3rd', 'JMSXDeliveryCount': '1'}, 'content': None}
      
      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> Nope, it's not working with Core client as well. Very same situation. I have tried both ways of doing it. 3 senders [1,root@mt_r6x0 clients]$ java -jar java/acc/target/acc.jar sender --log-msgs dict --conn-username admin --conn-password admin --address lvq --count 1 --msg-content "first" --broker localhost:61616 {'redelivered': False, 'reply_to': None, 'id': '95584f01-161b-11e7-a79d-c5e7e8848411', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490969338361, 'address': 'ActiveMQQueue[lvq]', 'properties': {'JMSXDeliveryCount': '0'}, 'content': 'first'} [0,root@mt_r6x0 clients]$ [0,root@mt_r6x0 clients]$ java -jar java/acc/target/acc.jar sender --log-msgs dict --conn-username admin --conn-password admin --address lvq --count 1 --msg-content "second" --broker localhost:61616 {'redelivered': False, 'reply_to': None, 'id': '99df0fe0-161b-11e7-bf8f-97ddf40d6bbe', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490969345955, 'address': 'ActiveMQQueue[lvq]', 'properties': {'JMSXDeliveryCount': '0'}, 'content': 'second'} [0,root@mt_r6x0 clients]$ [0,root@mt_r6x0 clients]$ [0,root@mt_r6x0 clients]$ java -jar java/acc/target/acc.jar sender --log-msgs dict --conn-username admin --conn-password admin --address lvq --count 1 --msg-content "third" --broker localhost:61616 {'redelivered': False, 'reply_to': None, 'id': '9d4fcc15-161b-11e7-a4be-859459bc8539', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490969351727, 'address': 'ActiveMQQueue[lvq]', 'properties': {'JMSXDeliveryCount': '0'}, 'content': 'third'} Receiver of 3 (should be identical) messages [0,root@mt_r6x0 java]$ java -jar acc/target/acc.jar receiver --log-msgs dict --conn-username admin --conn-password admin --address queue://lvq --count 3 --broker localhost:61616 {'redelivered': False, 'reply_to': None, 'id': '95584f01-161b-11e7-a79d-c5e7e8848411', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490969338361, 'address': 'org.apache.activemq.artemis.jms.client.ActiveMQDestination@691370ec', 'properties': {'JMSXDeliveryCount': '1'}, 'content': 'first'} {'redelivered': False, 'reply_to': None, 'id': '99df0fe0-161b-11e7-bf8f-97ddf40d6bbe', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490969345955, 'address': 'org.apache.activemq.artemis.jms.client.ActiveMQDestination@691370ec', 'properties': {'JMSXDeliveryCount': '1'}, 'content': 'second'} {'redelivered': False, 'reply_to': None, 'id': '9d4fcc15-161b-11e7-a4be-859459bc8539', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490969351727, 'address': 'org.apache.activemq.artemis.jms.client.ActiveMQDestination@691370ec', 'properties': {'JMSXDeliveryCount': '1'}, 'content': 'third'} Let's try with "_AMQ_LVQ_NAME" (same problem) [1,root@mt_r6x0 java]$ java -jar acc/target/acc.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': '6739e7b9-161d-11e7-b3ee-52540142d03a', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490970119977, 'address': 'ActiveMQQueue[lvq]', 'properties': {'_AMQ_LVQ_NAME': '1st', 'JMSXDeliveryCount': '0'}, 'content': None} [0,root@mt_r6x0 java]$ java -jar acc/target/acc.jar sender --log-msgs dict --conn-username admin --conn-password admin --address lvq --count 1 --msg-property "_AMQ_LVQ_NAME=2nd" {'redelivered': False, 'reply_to': None, 'id': '6a8ff028-161d-11e7-bb39-52540142d03a', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490970125574, 'address': 'ActiveMQQueue[lvq]', 'properties': {'_AMQ_LVQ_NAME': '2nd', 'JMSXDeliveryCount': '0'}, 'content': None} [0,root@mt_r6x0 java]$ java -jar acc/target/acc.jar sender --log-msgs dict --conn-username admin --conn-password admin --address lvq --count 1 --msg-property "_AMQ_LVQ_NAME=3rd" {'redelivered': False, 'reply_to': None, 'id': '6e03e16e-161d-11e7-a156-52540142d03a', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490970131368, 'address': 'ActiveMQQueue[lvq]', 'properties': {'_AMQ_LVQ_NAME': '3rd', 'JMSXDeliveryCount': '0'}, 'content': None} [0,root@mt_r6x0 java]$ java -jar acc/target/acc.jar receiver --log-msgs dict --conn-username admin --conn-password admin --address queue://lvq --count 3 --broker localhost:61616 {'redelivered': False, 'reply_to': None, 'id': '6739e7b9-161d-11e7-b3ee-52540142d03a', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490970119977, 'address': 'ActiveMQQueue[lvq]', 'properties': {'_AMQ_LVQ_NAME': '1st', 'JMSXDeliveryCount': '1'}, 'content': None} {'redelivered': False, 'reply_to': None, 'id': '6a8ff028-161d-11e7-bb39-52540142d03a', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490970125574, 'address': 'ActiveMQQueue[lvq]', 'properties': {'_AMQ_LVQ_NAME': '2nd', 'JMSXDeliveryCount': '1'}, 'content': None} {'redelivered': False, 'reply_to': None, 'id': '6e03e16e-161d-11e7-a156-52540142d03a', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1490970131368, 'address': 'ActiveMQQueue[lvq]', 'properties': {'_AMQ_LVQ_NAME': '3rd', 'JMSXDeliveryCount': '1'}, 'content': None}
    • Affects:
      Compatibility/Configuration, User Experience

      Description

      Feature Last-Value Queue is not working as expected. AMQP & Openwire were fixed, but with Core this feature is failing.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jbertram Justin Bertram
                  Reporter:
                  mtoth Michal Toth
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: