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

[LTS] AMQP Messages should store actual expiration and survive between restarts on durable messages

    XMLWordPrintable

Details

    • Hide

      1) Configure the expiry-delay on an address setting :

      <address-setting match="#">
       <dead-letter-address>DLQ</dead-letter-address>
       <expiry-address>ExpiryQueue</expiry-address>
       <expiry-delay>300000</expiry-delay>
       <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>

      2) Send messages to a queue under that address using an AMQP producer. Used the quickstart amqp/queue example [consumer part commented].
      3) Browse the messages and you will see the proper expiration is set on the header based on what was configured for the expiry-delay.
      4) Restart the broker
      5) Browse the messages again and you will see that the expiration header has been set back to 0. The message will now no longer expire.

      Show
      1) Configure the expiry-delay on an address setting : <address-setting match= "#" > <dead-letter-address>DLQ</dead-letter-address> <expiry-address>ExpiryQueue</expiry-address> <expiry-delay>300000</expiry-delay> <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> 2) Send messages to a queue under that address using an AMQP producer. Used the quickstart amqp/queue example [consumer part commented] . 3) Browse the messages and you will see the proper expiration is set on the header based on what was configured for the expiry-delay. 4) Restart the broker 5) Browse the messages again and you will see that the expiration header has been set back to 0. The message will now no longer expire.
    • ARTEMIS-3027

    Description

      Expiration on AMQP Messages Set to Zero after Broker Restart.  This does not seem to occur with messages produced using openwire. 

      Attachments

        Issue Links

          Activity

            People

              csuconic@redhat.com Clebert Suconic
              rhn-support-jsherman Jason Sherman
              Roman Vais Roman Vais
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: