ZMPOP numkeys key [key ...] <MIN | MAX> [COUNT count]
@write,
@sortedset,
@slow,
Pops one or more elements, that are member-score pairs, from the first non-empty sorted set in the provided list of key names.
ZMPOP and BZMPOP are similar to the following, more limited, commands:
ZPOPMIN or ZPOPMAX which take only one key, and can return multiple elements.BZPOPMIN or BZPOPMAX which take multiple keys, but return only one element from just one key.See BZMPOP for the blocking variant of this command.
When the MIN modifier is used, the elements popped are those with the lowest scores from the first non-empty sorted set. The MAX modifier causes elements with the highest scores to be popped.
The optional COUNT can be used to specify the number of elements to pop, and is set to 1 by default.
The number of popped elements is the minimum from the sorted set's cardinality and COUNT's value.
| Redis Enterprise |
Redis Cloud |
Notes |
|---|---|---|
| ✅ Standard ✅ Active-Active |
✅ Standard ✅ Active-Active |
One of the following: