XRANGE key start end [COUNT count]

#Example

redis> XADD writers \* name Virginia surname Woolf
"1609040578002-0"
redis> XADD writers \* name Jane surname Austen
"1609040578002-1"
redis> XADD writers \* name Toni surname Morrison
"1609040578003-0"
redis> XADD writers \* name Agatha surname Christie
"1609040578003-1"
redis> XADD writers \* name Ngozi surname Adichie
"1609040578003-2"
redis> XLEN writers
(integer) 5
redis> XRANGE writers - + COUNT 2
1) 1) "1609040578002-0"
   2) 1) "name"
      2) "Virginia"
      3) "surname"
      4) "Woolf"
2) 1) "1609040578002-1"
   2) 1) "name"
      2) "Jane"
      3) "surname"
      4) "Austen"

Return a range of elements in a stream, with IDs matching the specified IDs interval

Comments