Arguments
The consumer name that will claim the messages.
The minimum idle time in milliseconds for messages to be claimed.
ids
string | string[]
required
The ID(s) of the message(s) to claim. Can be a single ID or an array of IDs.
Set the idle time of the message.
Set the idle time to a specific Unix time.
Set the retry counter to the specified value.
Create the pending message entry even if certain IDs are not already pending.
Return only the message IDs instead of the full message data.
Response
Returns an array of claimed messages. If justid
option is used, returns only message IDs.
const result = await redis.xclaim(
"mystream",
"mygroup",
"consumer1",
60000,
["1638360173533-0", "1638360173533-1"]
);
[
["1638360173533-0", ["field1", "value1", "field2", "value2"]],
["1638360173533-1", ["field1", "value3", "field2", "value4"]]
]