Skip to main content

Arguments#

keystringrequired#

The key of the stream.

groupstringrequired#

The consumer group name.

consumerstringrequired#

The consumer name that will claim the messages.

minIdleTimenumberrequired#

The minimum idle time in milliseconds for messages to be claimed.

idsstring | string[]required#

The ID(s) of the message(s) to claim. Can be a single ID or an array of IDs.

options#
Note

Upstash Redis does not support the IDLE, TIME, RETRYCOUNT, FORCE, and LASTID options of XCLAIM, so the SDK’s idleMS, retryCount, force, and lastId options fail with an error. timeMS is only sent together with idleMS, so on its own it is ignored.

Response#

Array<[string, string[]]> | string[]

Returns an array of claimed messages. If justId option is used, returns only message IDs.