BZPOPMIN

Apply for Redis Developer Course Redis Regular Inspection / Technical Support Redis Enterprise Server

When data arrives, pop the smallest value first

Usage is bzpopmin key [key ...] timeout.
If the set already has data, it is the same as ZPOPMIN. If there is no data, it waits for timeout (seconds). timeout is specified in seconds, and 0 waits until data is entered when the set is empty. When data arrives it pops and shows key, value, score, and elapsed time (seconds).
See BLPOP for the blocking concept.

Example

Command>zadd city 50 Tokey 60 Seoul 70 Beijing 80 "New York"
Result>4
Command>bzpopmin city 3
Result> 1) "city"
2) "Tokey"
3) "50"


Syntax

BZPOPMIN key [key ...] timeout

  • Available since version 5.0.0.
  • Time complexity is O(log(N)). N is the number of members in the set.

<< ZPOPMAX BZPOPMIN BZPOPMAX >>

Email 답글이 올라오면 이메일로 알려드리겠습니다.