BLMPOP

Pops a batch from a list's left end with a waiting timeout.

Lists · Example verified

Syntax covered here

BLMPOP timeout-seconds numkeys key LEFT COUNT count

The case uses one key and COUNT to retrieve two elements; a missing list times out with null.

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
> BLMPOP 0.1 1 queue LEFT COUNT 2
["queue",["a","b"]]
# connection: default
> BLMPOP 0.1 1 missing-list LEFT COUNT 2
null