I'm new in activemq and jms and I need to set a ttl for all messages in my queue. Is there any possibility to set a ttl of all incoming messages in a queue? I only found an option "expireMessagesPeriod" for policyEntry tag, which is responsible for checking frequency of expired messages. I understand that I can set the time to live only for a concrete message, not to the whole queue.
ActiveMQ provides a TimeStampBrokerPlugin that can be used to apply TTL values to message that arrive without a set TTL. You configure the plugin in your activemq.xml and can use the 'zeroExpirationOverride' value to configure the preferred TTL.
<plugins>
<timeStampingBrokerPlugin/>
</plugins>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With