BZPOPMIN key [key ...] timeout
It is the blocking version because it blocks the connection when there are no members to pop from any of the given sorted sets. A member with the lowest score is popped from first sorted set that is non-empty, with the given keys being checked in the order that they are given.
timeout argument is interpreted as an double value specifying the maximum number of seconds to block. A timeout of zero can be used to block indefinitely.
Array reply: specifically:
nilmulti-bulk when no element could be popped and the timeout expired.
timeoutis interpreted as a double instead of an integer.
redis> DEL zset1 zset2 (integer) 0 redis> ZADD zset1 0 a 1 b 2 c (integer) 3 redis> BZPOPMIN zset1 zset2 0 1) "zset1" 2) "a" 3) "0"
© 2009–2020 Salvatore Sanfilippo
Licensed under the Creative Commons Attribution-ShareAlike License 4.0.