How do I set the message expiration

 FAQ > Using Apache ActiveMQ > How do I set the message expiration

JMSExpiration on a message is set by the MessageProducer in JMS - either via

For the end-to-end view of how TTL becomes JMSExpiration, how the broker enforces expiry, and why clock synchronization matters, see Message Expiry.

Apache, ActiveMQ, Apache ActiveMQ, the Apache logo, and the Apache ActiveMQ project logo are trademarks of The Apache Software Foundation. Copyright © 2025, The Apache Software Foundation. Licensed under Apache License 2.0.