XADD key [MAXLEN [=|~] length] [NOMKSTREAM] *|ID field value [field value ...]

#Example

redis> XADD mystream \* name Sara surname OConnor
"1609040574632-0"
redis> XADD mystream \* field1 value1 field2 value2 field3 value3
"1609040574632-1"
redis> XLEN mystream
(integer) 2
redis> XRANGE mystream - +
1) 1) "1609040574632-0"
   2) 1) "name"
      2) "Sara"
      3) "surname"
      4) "OConnor"
2) 1) "1609040574632-1"
   2) 1) "field1"
      2) "value1"
      3) "field2"
      4) "value2"
      5) "field3"
      6) "value3"

Appends a new entry to a stream

Comments