You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
@vvnekb Thanks for reporting this issue! I don't know what is the reason to return only the second element on the response and I think it's really make sense to return all of it so I fixed it in this PR #2252
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:
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.
The text was updated successfully, but these errors were encountered: