Skip to main content

BRPOPLPUSH

Note

Official reference: BRPOPLPUSH.

Wait and move the source tail element to the destination head.

Syntax

BRPOPLPUSH source destination timeout

timeout is in seconds. Use a nonnegative integer literal; 0 waits indefinitely. The example inserts elements before waiting.

New code can use BLMOVE with RIGHT LEFT.

Results

ReturnRowsContent
ResultSet1ELEMENT field, STRING type

Example

RPUSH demo:queue first second
BRPOPLPUSH demo:queue demo:processing 1