ActiveMQ JMS 中的 TimeToLive 和 expiry-address 有什么区别?

What is the difference between TimeToLive and expiry-address in ActiveMQ JMS?

你能解释一下 ActiveMQ Artemis 中 timeToLive 和 expiry-address 属性之间的区别吗?

不太清楚有什么区别,它们是独立的还是互补的。

http://activemq.apache.org/components/artemis/documentation/latest/message-expiry.html

这些功能是互补的。 JMS API 允许在消息上设置 TimeToLive。当代理收到带有 TimeToLive 的消息时,它将监视该消息,并且当设置的时间过去时,消息将按照配置的 "expired"。过期消息可以发送到过期地址,也可以简单地删除。代理还可以通过 <expiry-delay> <address-setting>.

对传入消息强制执行自己的 TimeToLive