_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

Redis Streams

05. 08. 2021 1 min read intermediate

Append-only log with consumer groups. Persistent alternative to Pub/Sub.

Basics

XADD events * type click user_id 123
XRANGE events - + COUNT 10
XLEN events

Consumer Groups

XGROUP CREATE events mygroup $ MKSTREAM
XREADGROUP GROUP mygroup consumer1 COUNT 5 BLOCK 2000 STREAMS events >
XACK events mygroup 1234567890-0

Advantages vs Pub/Sub

  • Persistence
  • Consumer groups
  • Acknowledgment
  • Replay

Streams = Kafka-lite

Sufficient for most use cases instead of Kafka.

redisstreamsevent sourcing
Share:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.