Streams in Redis

From the Redis cheat sheet ยท Pub/Sub & Streams ยท verified Jul 2026

Streams

Persistent message streams with consumer groups

bash
# Add to stream
XADD mystream * field1 value1 field2 value2

# Read from stream
XREAD COUNT 2 STREAMS mystream 0

# Consumer groups
XGROUP CREATE mystream mygroup 0
XREADGROUP GROUP mygroup consumer1 STREAMS mystream >
๐Ÿ’พ Persistent message history
๐Ÿ‘ฅ Consumer groups for distributed processing
โœ… Message acknowledgment support
๐Ÿ“Š Better than pub/sub for reliable messaging

More Redis tasks

Back to the full Redis cheat sheet