Skip to main content
Prefer BLMOVE with RIGHT and LEFT in new code: BLMOVE <source> <destination> RIGHT LEFT <timeout>.
Use BRPOPLPUSH to pop an element from the tail of one list and push it to the head of another, blocking until the source has an element or the timeout expires. It is the blocking form of RPOPLPUSH. The timeout is in seconds, may be fractional, and 0 waits indefinitely; when it expires the reply is null. Since the element moves atomically into the destination, a worker that crashes after taking an item leaves it visible in the processing list, where it can be recovered. BLMOVE does the same thing and additionally lets you choose which end of each list to use.

Syntax

Arguments

Important points

  • A blocking form holds the request until data arrives or its timeout expires. Set the client/network timeout longer than the command timeout.

Response

The reply reports the result of the operation. Error replies have the same shape in RESP2 and RESP3 and are surfaced as exceptions by the SDKs below.
Client libraries often decode bulk strings, maps, sets, and numeric strings into language-native values. The table describes the Redis wire reply.

Examples

TCP examples use the TLS REDIS_URL from the Upstash console. REST examples use UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN.
This command is not supported yet in @upstash/redis.
This command is not supported yet in upstash_redis.

Related topics

REST API