BZPOPMIN
Removes the lowest-score member, waiting up to a timeout if needed.
Sorted sets · Example verified
Syntax covered here
BZPOPMIN key timeout-secondsThe cases exercise an immediate minimum pop and a timeout with no available key.
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
> ZADD scores 1 a 2 b
2
# connection: default
> BZPOPMIN scores 0.1
["scores","a","1"]
# connection: default
> BZPOPMIN missing-zset 0.1
null