Skip to main content

Arguments

key
str
required
The key of the stream.
end
str
default:"+"
The stream entry ID to end at (highest ID).
start
str
default:"-"
The stream entry ID to start from (lowest ID).
count
int
The maximum number of entries to return.

Response

Returns a list of stream entries in reverse chronological order. Each entry contains the ID and field-value pairs.
result = redis.xrevrange("mystream", "+", "-")
[
  ["1638360173533-2", ["field1", "value5", "field2", "value6"]],
  ["1638360173533-1", ["field1", "value3", "field2", "value4"]],
  ["1638360173533-0", ["field1", "value1", "field2", "value2"]]
]
I