Description
Version: redis-py 4.3.3, redis 7.0.0
Platform: python 3.9, ubuntu 20.04
Description: I tried to implement the iterative XAUTOCLAIM as described in Redis docs:
The command returns the claimed entries as an array. It also returns a stream ID intended for cursor-like use as the argument for its subsequent call. When there are no remaining PEL entries, the command returns the special 0-0 ID to signal completion.
...
Return
Array reply, specifically:
An array with three elements:
- A stream ID to be used as the argument for the next call to XAUTOCLAIM.
- An array containing all the successfully claimed messages in the same format as XRANGE.
- An array containing message IDs that no longer exist in the stream, and were deleted from the PEL in which they were found.
Unfortunately, I found out that redis-py drops first element of array completely and returns just the second part (claimed messages), as can be seen in parse_xautoclaim. So it is not possible to figure out the start_id for the next call.
What is the rationale behind that decision? It looks like there are cases when id of last scanned stream item is quite useful.