Stream
XPENDING
Returns information about pending messages in a stream consumer group.
Arguments
keybodystringrequired
The key of the stream.
groupbodystringrequired
The consumer group name.
startbodystringrequired
The minimum pending ID to return. Use "-" for the first available ID.
endbodystringrequired
The maximum pending ID to return. Use "+" for the last available ID.
countbodynumberrequired
The maximum number of pending messages to return.
optionsbody
Response
Returns an array of pending message details.
Summary
const result = await redis.xpending("mystream", "mygroup", "-", "+", 10);With idle time filter
const result = await redis.xpending("mystream", "mygroup", "-", "+", 5, { idleTime: 10000});Specific consumer filter
const result = await redis.xpending("mystream", "mygroup", "-", "+", 5, { consumer: "consumer1"});[ 2, // total pending count "1638360173533-0", // smallest pending ID "1638360173533-1", // greatest pending ID [ ["consumer1", "1"], // consumer and their pending count ["consumer2", "1"] ]]