BZPOPMAX

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

When data arrives, pop the largest value first

Usage is bzpopmax key [key ...] timeout.
If the set already has data, it is the same as ZPOPMAX. 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>bzpopmax city 3
Result> 1) "city"
2) "New York"
3) "80"


Syntax

BZPOPMAX key [key ...] timeout

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

<< BZPOPMIN BZPOPMAX ZISMEMBER >>

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