kevy4.0

XADD

Append an entry to a stream, with optional trim.

XADD key [NOMKSTREAM] [MAXLEN [=|~] threshold | MINID [=|~] id] id|* field value [field value ...]
Group
Stream
Since
1.0.0
Arity
at least 5
Flags
write

Complexity

O(log N) to insert; O(N*F) whenever a MAXLEN / MINID clause actually evicts, because the trim triggers a full weight recompute

Complexity and compatibility are read out of kevy's implementation, not copied from Redis's reference. Several genuinely differ.

Redis compatibility

Differs

the approximate-trim '~' is accepted for wire compatibility but always trims exactly, and the LIMIT clause is not parsed

See also

XACKXAUTOCLAIMXCLAIMXDELXGROUPXINFOXLENXPENDINGXRANGEXREADXREADGROUPXREVRANGEXSETIDXTRIM

← All commands