@@ -19,8 +19,11 @@ limitations under the License.
19
19
20
20
## <a id =" overview " class =" anchor " href =" #overview " >Overview</a >
21
21
22
- RabbitMQ allows you to set TTL (time to live) for both messages and queues.
23
- This is controlled by [ optional queue arguments] ( queues.html ) and best done using a [ policy] ( ./parameters.html ) .
22
+ RabbitMQ allows you to set TTL (time to live) for both messages and queues. Expired
23
+ messages and queues will be deleted: the specifics will be covered in more detail
24
+ later in this guide.
25
+
26
+ TTL behavior is controlled by [ optional queue arguments] ( queues.html ) and best done using a [ policy] ( ./parameters.html ) .
24
27
25
28
Message TTL can be applied to a single queue, a group of
26
29
queues or applied on the message-by-message basis.
@@ -181,9 +184,14 @@ purging, or queue deletion).
181
184
## <a id =" queue-ttl " class =" anchor " href =" #queue-ttl " >Queue TTL</a >
182
185
183
186
TTL can also be set on queues, not just queue contents.
187
+ This feature can be used together with the [ auto-delete queue property] ( queues.html ) .
188
+
189
+ Setting TTL (expiration) on queues generally only makes sense
190
+ for transient (non-durable) classic queues. Quorum queues and streams
191
+ do not support expiration.
192
+
184
193
Queues will expire after a period of time only when they
185
- are not used (e.g. do not have consumers). This feature
186
- can be used together with the [ auto-delete queue property] ( queues.html ) .
194
+ are not used (a queue is used if it has online consumers).
187
195
188
196
Expiry time can be set for a given queue by setting the
189
197
` x-expires ` argument to ` queue.declare ` ,
@@ -199,8 +207,7 @@ drained.
199
207
The server guarantees that the queue will be deleted, if
200
208
unused for at least the expiration period. No guarantee is
201
209
given as to how promptly the queue will be removed after the
202
- expiration period has elapsed. Leases of durable queues
203
- restart when the server restarts.
210
+ expiration period has elapsed.
204
211
205
212
The value of the ` x-expires ` argument or
206
213
` expires ` policy describes the expiration period in
0 commit comments