Skip to content

Commit f5e81c6

Browse files
Update xtrim.md with consumer group reference details (#2431)
* Update xtrim.md with consumer group reference details Clarify handling of consumer group references when trimming in Redis. Added details about the default option and behavior of KEEPREF, DELREF, and ACKED. * Update content/commands/xtrim.md --------- Co-authored-by: David Dougherty <david.dougherty@redis.com>
1 parent bf46eaa commit f5e81c6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

content/commands/xtrim.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ Limits the number of entries to examine during trimming. Available since Redis 6
152152
<details open>
153153
<summary><code>KEEPREF | DELREF | ACKED</code></summary>
154154

155-
Specifies how to handle consumer group references when trimming. If no option is specified, `KEEPREF` is used by default:
155+
Specifies how to handle consumer group references when trimming. If there are no consumer groups, these arguments have no effect. Available since Redis 8.2.
156+
157+
If no option is specified, `KEEPREF` is used by default. Unlike the `XDELEX` and `XACKDEL` commands where one of these options is required, here they are optional to maintain backward compatibility:
156158

157159
- `KEEPREF` (default): When trimming, removes entries from the stream according to the specified strategy (`MAXLEN` or `MINID`), regardless of whether they are referenced by any consumer groups, but preserves existing references to these entries in all consumer groups' PEL (Pending Entries List).
158160
- `DELREF`: When trimming, removes entries from the stream according to the specified strategy and also removes all references to these entries from all consumer groups' PEL.

0 commit comments

Comments
 (0)