XCFGSET

Since 1.1.0Streams

Syntax

XCFGSET key field value [field value ...]
  • Flags: write
  • ACL categories: @slow, @stream, @write
  • Arity: -2

Sets the configuration of the stream at key.

FieldEffect
MAX-ENTRIES nTrim the stream to n entries on every XADD; 0 stops it.
MAX-DELETED-ENTRY-ID idRaise the greatest ID counted as deleted; it never goes down.
IDMP-DURATION secondsHow long idempotent IDs are remembered, per producer; the default is stream-idmp-duration.
IDMP-MAXSIZE nHow many idempotent IDs are remembered, per producer; the default is stream-idmp-maxsize.

Reply

  • OK.
  • ERR syntax error for another field.

Examples

> XCFGSET i MAX-ENTRIES 2
OK
> XADD i * x 1
"1792966338096-0"
> XADD i * x 2
"1792966338097-0"
> XADD i * x 3
"1792966338097-1"
> XLEN i
(integer) 2