sincecutoff.com
← all changes

Redis XREAD and XREADGROUP add MAXCOUNT and MAXSIZE reply caps

Introduced 2026-07-29 · score 0.96

HOW TO USE IT

When reading one or more streams on Redis 8.10.0+, add `MAXCOUNT` to cap total entries, `MAXSIZE` to cap reply bytes, or both. At least one entry is returned even if it exceeds `MAXSIZE`; if both caps are set, the first reached applies.

XREAD MAXCOUNT <entry_limit> MAXSIZE <byte_limit> STREAMS <stream_key> <last_seen_id>
XREADGROUP GROUP <group> <consumer> MAXCOUNT <entry_limit> MAXSIZE <byte_limit> STREAMS <stream_key> <last_seen_id>

WHY THIS HELPS

Cap the cumulative reply entries or size when reading Redis streams.

REQUIREMENTS AND LIMITATIONS

  • Version: 8.10.0
  • MAXCOUNT maxcount: Positive integer: maximum total entries across all named streams. If `COUNT` is also supplied, `MAXCOUNT` must be at least `COUNT`.
  • MAXSIZE maxsize: Positive integer: maximum reply size in bytes across all named streams. At least one entry is returned, even if it exceeds this limit.
  • STREAMS key [key ...] id [id ...] (required): Stream keys followed by one ID per key; entries with IDs greater than each supplied ID are returned.
  • GROUP group consumer (required): For `XREADGROUP`, identifies the consumer group and consumer.
  • Prerequisite: Use Redis 8.10.0 or later; these options were added in 8.10.0.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card