BRPOP

Removes a list's rightmost element, waiting up to a timeout when necessary.

Lists · Example verified

Syntax covered here

BRPOP key timeout-seconds

A populated list returns its tail immediately; a missing list produces null after the tested timeout.

Tested example & replies

Requests below run in order against an empty database. Each connection authenticates with the fixture password first. Quoted values are strings; null is a nil reply; arrays preserve RESP order.

# connection: default
> RPUSH queue a b c
3
# connection: default
> BRPOP queue 0.1
["queue","c"]
# connection: default
> BRPOP missing-list 0.1
null