Streams

Append-only logs of entries with IDs, read by range or by blocking, and shared out by consumer groups with acknowledgements and claims.

29 commands in KiviDB 1.2.2. Every command.

  • XACK: Acknowledges entries that the consumer group group delivered: they leave the group's pending entries list, and XPENDING no longer shows them.
  • XACKDEL: Acknowledges entries for the group and deletes them from the stream, in one step (Redis 8.2).
  • XADD: Appends an entry, a set of field-value pairs, to the stream at key.
  • XAUTOCLAIM: Goes through the group's pending entries from start and gives consumer those idle at least min-idle-time milliseconds, COUNT count at a time (100 by default).
  • XCFGSET: Sets the configuration of the stream at key.
  • XCLAIM: Gives pending entries to consumer, if they have been idle at least min-idle-time milliseconds: for when the consumer that had them stopped.
  • XDEL: Deletes entries from the stream at key by ID.
  • XDELEX: Deletes entries from the stream at key, with control over the references consumer groups hold to them (Redis 8.2).
  • XGROUP: XGROUP is a container: its subcommands create and manage consumer groups.
    • XGROUP CREATE: Creates the consumer group group on the stream at key, which will deliver entries after id: 0 for every entry, $ for only those added from now on.
    • XGROUP CREATECONSUMER: Creates the consumer consumer in the consumer group group of the stream at key.
    • XGROUP DELCONSUMER: Deletes the consumer consumer from the consumer group group, with its pending entries.
    • XGROUP DESTROY: Deletes the consumer group group of the stream at key, with its consumers and its pending entries list.
    • XGROUP HELP: Lists the XGROUP subcommands, with a line or two on what each does, as Redis does.
    • XGROUP SETID: Sets the last delivered ID of the consumer group group: the ID after which XREADGROUP with > delivers entries.
  • XINFO: XINFO is a container: its subcommands report on a stream, its consumer groups, and their consumers.
    • XINFO CONSUMERS: Returns, for each consumer of the group: its name, how many entries it has pending, the milliseconds since it last read (idle), and the milliseconds since its last read that returned entries (inactiv…
    • XINFO GROUPS: Returns, for each consumer group of the stream: its name, its consumers' count, its pending entries' count, the last ID it delivered, how many entries it has read, and its lag, how many entries it ha…
    • XINFO HELP: Lists the XINFO subcommands, with a line or two on what each does, as Redis does.
    • XINFO STREAM: Returns the stream's length, its first and last entries and IDs, how many entries it has ever had and the greatest it has deleted, its consumer groups' count, and its idempotent-ID settings and count…
  • XLEN: Returns the number of entries in the stream at key.
  • XNACK: Releases pending entries back to the group without acknowledging them, so that another consumer can take them at once, with XREADGROUP ... CLAIM or XAUTOCLAIM.
  • XPENDING: Returns the entries the group has delivered and that are not yet acknowledged.
  • XRANGE: Returns the entries of the stream at key with IDs from start to end, both included, oldest first.
  • XREAD: Reads entries with IDs greater than the ones given, from one or more streams.
  • XREADGROUP: Reads entries for consumer of consumer group group.
  • XREVRANGE: Returns the entries of the stream at key from end down to start, newest first: XRANGE in reverse, with the two bounds given the other way round.
  • XSETID: Sets the last ID of the stream at key, so that new entries get greater IDs.
  • XTRIM: Removes the oldest entries of the stream at key.