Arguments
The minimum pending ID to return. Use ”-” for the first available ID.
The maximum pending ID to return. Use ”+” for the last available ID.
The maximum number of pending messages to return.
Filter by minimum idle time in milliseconds.
Filter results by a specific consumer.
Response
Returns an array of pending message details.
const result = await redis.xpending("mystream", "mygroup", "-", "+", 10);
[
2, // total pending count
"1638360173533-0", // smallest pending ID
"1638360173533-1", // greatest pending ID
[
["consumer1", "1"], // consumer and their pending count
["consumer2", "1"]
]
]