XAUTOCLAIM
Since 1.1.0Streams
Syntax
XAUTOCLAIM key group consumer min-idle-time start [COUNT count] [JUSTID]Goes through the group's pending entries from start and gives consumer those idle at least min-idle-time milliseconds, COUNT count at a time (100 by default). Call again with the cursor it returns, until it returns 0-0.
Reply
A three-element array:
- the cursor to call again with,
0-0when done; - the entries claimed, or their IDs with
JUSTID; - the IDs of entries that were pending but no longer exist, now removed from the pending list.
Examples
> XAUTOCLAIM jobs workers carol 0 0-0 JUSTID
1) "0-0"
2) 1) "2-0"
2) "3-0"
3) (empty array)