Skip to content

Commit db09cdf

Browse files
Clarify that TTL makes no sense for durable queues and streams
in particular for durable and replicated queues.
1 parent eff67d4 commit db09cdf

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

site/ttl.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ limitations under the License.
1919

2020
## <a id="overview" class="anchor" href="#overview">Overview</a>
2121

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).
2427

2528
Message TTL can be applied to a single queue, a group of
2629
queues or applied on the message-by-message basis.
@@ -181,9 +184,14 @@ purging, or queue deletion).
181184
## <a id="queue-ttl" class="anchor" href="#queue-ttl">Queue TTL</a>
182185

183186
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+
184193
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).
187195

188196
Expiry time can be set for a given queue by setting the
189197
`x-expires` argument to `queue.declare`,
@@ -199,8 +207,7 @@ drained.
199207
The server guarantees that the queue will be deleted, if
200208
unused for at least the expiration period. No guarantee is
201209
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.
204211

205212
The value of the `x-expires` argument or
206213
`expires` policy describes the expiration period in

0 commit comments

Comments
 (0)