blog by OSO

Redis Streams vs Kafka: When Each One Fits

Sion Smith
Sion Smith 26 November 2026
OSO comparison of Redis Streams and Apache Kafka, with white title text on a navy panel and a lime Blogs label.

What is the difference between Redis Streams and Kafka?

Redis Streams is a data type inside Redis. Apache Kafka is a separate, distributed streaming platform. Both store an append-only log of events, but they sit in very different places in your architecture.

A Redis stream lives under a single Redis key. You append entries with XADD, read them with XREAD or XRANGE, and share work between consumers with XREADGROUP and XACK. Each entry is a small set of field-value pairs with a time-based id. The Redis Streams documentation describes adding an entry as an O(1) operation.

Kafka stores events in topics. Each topic is split into partitions, and the partitions are spread across brokers. The Kafka introduction explains that this placement lets clients read and write from many brokers at once. If you are new to the platform, start with what Apache Kafka is.

AspectRedis StreamsApache Kafka
What it isA data type in RedisA distributed commit log
Unit of scaleOne stream per keyPartitions across brokers
Where data livesRedis memory, with optional AOF/RDB persistenceLog segments on broker disk
Default retentionUntil you trim with MAXLEN or MINID7 days (retention.ms), or compaction
Consumer modelConsumer groups with a pending entries listConsumer groups with partition assignment and offsets
EcosystemRedis clients and commandsKafka Connect, Kafka Streams, Schema Registry

So the real choice is rarely “which log is better”. It is whether a feature of a data store you already run is enough, or whether you need a streaming platform.

How do consumer groups compare?

Both have consumer groups, but they work in different ways.

In Redis, a consumer group is a server-side load balancer for one stream. XREADGROUP hands each new entry to whichever consumer asks next. Redis tracks every delivered but unacknowledged entry in a pending entries list (PEL) until the consumer calls XACK. If a consumer dies, another one can take over its pending entries with XCLAIM, or with XAUTOCLAIM, which Redis added in version 6.2.

The Redis documentation is direct about the difference. Its partitions are only logical, so a faster consumer simply receives more entries. The same page notes that a single stream is not automatically partitioned across Redis instances. To spread one logical stream across nodes, you shard it into several keys yourself or through Redis Cluster.

In Kafka, a consumer group divides a topic’s partitions between its members. Each partition is read by one consumer in the group at a time, so order holds within a partition. Consumers commit offsets to record progress, and the group rebalances when members join or leave.

BehaviourRedis StreamsApache Kafka
How work is splitPer entry, to whichever consumer is readyPer partition, assigned to one member
OrderingIn order with one consumer; may reorder with manyIn order within each partition
Tracking progressPending entries list plus XACKCommitted offsets per partition
Recovering stuck workXCLAIM or XAUTOCLAIMRebalance, then resume from the committed offset
Scaling a single streamMore consumers on one key; sharding is manualAdd partitions and consumers

Kafka also has a newer queue-style model. See our guide to queues in Kafka 4.0 via share groups if per-message acknowledgement is what draws you to Redis.

How do retention, replay and durability differ?

This is where the two diverge most.

Retention. A Redis stream keeps entries until you trim it. You cap it with MAXLEN or MINID, either on XADD or with XTRIM. Because Redis holds the stream in memory, long retention costs RAM. The Redis docs suggest moving history to a storage tier that is “not in memory” when you need to keep it.

Kafka retains data on disk by time or size. The topic setting retention.ms defaults to 604800000 ms, which is 7 days, according to the Kafka topic configuration reference. You can set -1 to keep data indefinitely, or use cleanup.policy=compact to keep the latest value for each key.

Replay. Any Kafka consumer group can start from an earlier offset and re-read history. New teams can join months later and read the same events without affecting anyone else. Redis also lets you read history with XRANGE, but only for entries you have not yet trimmed.

Durability. Redis can persist streams. Streams and consumer group state are written to AOF and RDB files and copied to replicas. However, the Redis persistence notes for streams say that AOF needs a strong fsync policy if message persistence matters. Replication is asynchronous by default, so a failover can lose recent XADD calls. The WAIT command makes loss “very unlikely”, but failover is still best effort.

Kafka replicates each partition to several brokers. With acks=all, a write succeeds only when the in-sync replicas required by min.insync.replicas have it. Our article on Kafka replication explained covers ISR, leaders and failover in depth.

Key takeaway: Pick Redis Streams for a simple stream on an existing Redis cluster; pick Kafka when many teams need to retain, replay and share the same events.

When is Redis Streams the better fit?

Redis Streams is a sound choice in more cases than Kafka vendors tend to admit. It fits well when:

  • you already run Redis in production and have people who know it;
  • the volume is modest and fits comfortably in memory;
  • retention is short, such as minutes or hours of work items;
  • one team owns both the producers and the consumers;
  • you need a simple task queue, notification feed or activity stream;
  • low latency on a single node matters more than long history.

In these cases, adding a Kafka cluster brings brokers, KRaft controllers, monitoring and upgrades you may not need. Our guide on when not to use Apache Kafka covers this honestly.

Keep an eye on the warning signs, though. Watch for streams that keep growing in memory, more teams asking for the same data, and replay requests after incidents. These usually mean the job has outgrown a data type.

When should you choose Kafka instead?

Choose Kafka when events become shared infrastructure rather than a private queue. Typical signals are:

  • Many independent consumers. Analytics, search, billing and audit all read the same topic at their own pace.
  • Long retention and replay. You need days, weeks or years of history, or the ability to rebuild a downstream store.
  • High, growing throughput. Partitions let you scale writes and reads across brokers. We do not quote a headline throughput figure here, because results depend on hardware, payloads and settings; benchmark with your own workload.
  • Integration. Kafka Connect moves data to and from databases, object storage and SaaS tools without custom code.
  • Transactional processing. Kafka’s idempotent producer and transactions give exactly-once delivery between Kafka topics, including offset commits. This does not make a whole business workflow exactly once: external side effects still need idempotent handling.

If your decision is really about message brokers in general, our Kafka vs RabbitMQ comparison explains when a broker or a log suits better.

Running Kafka well takes effort. OSO’s Kafka consulting services help teams design and migrate, and Kafka support covers clusters already in production.

Frequently asked questions

Is Redis Streams the same as Kafka?

No. Redis Streams is a data type inside Redis, while Kafka is a distributed streaming platform with partitioned topics across brokers. Both store an append-only log, but they differ in retention, scaling and ecosystem.

Can Redis Streams replace Kafka?

Sometimes, for small and short-lived workloads. If one team needs a simple stream with short retention on an existing Redis deployment, Redis Streams can do the job. It is a poor replacement when many teams need long retention, replay or connectors.

Does Redis Streams support consumer groups?

Yes. Redis Streams has consumer groups through XREADGROUP, with a pending entries list and XACK for acknowledgement. Stuck entries can be reassigned with XCLAIM or XAUTOCLAIM.

Which handles greater throughput, Redis Streams or Kafka?

Kafka is built to scale throughput across many brokers and partitions, while a single Redis stream lives on one node. Redis can be very fast for a modest stream in memory. Benchmark your own workload rather than trusting a headline number.

Can I move from Redis Streams to Kafka later?

Yes. A common path is to dual-write or run a bridge consumer that reads from the Redis stream and produces to a Kafka topic, then move consumers over one at a time. Plan keys and partitions first, because Kafka orders events only within a partition.

Is Kafka harder to run than Redis Streams?

Usually, yes. Kafka means running a cluster of brokers and controllers, with monitoring, capacity planning and upgrades. Managed services and expert support reduce that work, but it is still more to own than a feature of an existing Redis deployment.

Choosing between Redis and Kafka?

OSO engineers run Apache Kafka in production for banks, retailers and the public sector. Tell us what you are weighing up and we will give you a straight answer.

CONTACT US
OSO
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.