Skip to content

Commit 0ce4bf7

Browse files
authored
Clarified ordering guarantees in XREADGROUP (#2752)
Clarified ordering guarantees for CLAIM in XREADGROUP documentation.
1 parent e247868 commit 0ce4bf7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

content/commands/xreadgroup.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,15 @@ When `CLAIM min-idle-time` is used, additional information is provided for each
180180

181181
### Ordering guarantees
182182

183-
When using `CLAIM`, the following ordering guarantees apply:
183+
Within each stream, entries are reported in the same order they were added by `XADD` (older first).
184+
185+
When not blocked, across streams, entries are reported in the order the streams were specified.
186+
187+
When using `CLAIM`, the following ordering guarantees apply per stream:
184188

185189
- Idle pending entries are reported first, then incoming entries
186190
- Idle pending entries are ordered by idle time (longer first)
187-
- Incoming entries are ordered by the order they were appended to the stream (older first)
191+
- Incoming entries are reported in the order they were added by `XADD` (older first)
188192

189193
For example, if there are 20 idle pending entries and 200 incoming entries (in all the specified streams together):
190194
- When calling `XREADGROUP ... CLAIM ...`, you would retrieve 220 entries in the reply

0 commit comments

Comments
 (0)