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'}