Expiration on AMQP Messages Set to Zero after Broker Restart

Solution Unverified - Updated -

Issue

Steps to reproduce :

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. Use the quickstart amqp/queue example [comment consumer part].
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.

Environment

  • Red Hat AMQ
    • 7.7.0

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