9bNine Bits

Redis vs Kafka: Which Should You Use for Event Streaming and Messaging?

Use Redis Streams or Pub/Sub for lightweight, low-latency messaging inside one application stack, and use Kafka when events must be durable, replayable, and shared by many independent consumers. Redis is an in-memory data structure store that doubles as a cache and message broker, while Kafka is a distributed event streaming platform. They are different categories of software, so the choice depends on how long events must live and who needs to read them.
Redis vs Kafka: Which Should You Use for Event Streaming and Messaging?

Decision summary

Choose Redis when you need a fast, in-memory messaging layer on top of a cache or key-value store: task queues, real-time notifications, or short-lived event buses where capping history is acceptable. Choose Kafka when events must be durable, replayable, and consumed by several independent services over long periods, such as event sourcing, log aggregation, or integration between teams. Many stacks run both: Redis for ephemeral signaling, Kafka as the durable backbone other systems replay from.

CriterionRedis (Streams / Pub/Sub)Kafka
CategoryIn-memory data structure store, used as a database, cache and message brokerEvent streaming platform: a cluster of servers and clients communicating over a TCP protocol
Messaging primitivesPub/Sub (fire-and-forget) and Streams (append-only log type with consumer groups)Topics split into partitions
PersistenceOn-disk persistence levels (RDB snapshots, AOF); data is memory-resident, so durability depends on configuration and replicationEvents stored durably and reliably for as long as you want
RetentionStreams grow until trimmed (XTRIM or MAXLEN); memory is the limitTime-based or size-based policy on disk, independent of whether consumers have read the records
Consumer groupsPending entries list per group; no partitionsOffsets committed per partition; each partition has one owner in the group at a time
Scaling and availabilityReplication, high availability via Redis Sentinel, automatic partitioning via Redis ClusterDistributed, highly scalable, elastic, fault-tolerant cluster; scale by adding partitions and brokers
Beyond messagingStrings, hashes, lists, sets, sorted sets, geospatial indexes, Lua scripting, LRU eviction, transactions; Redis 8 adds Vector sets (beta)Publish/subscribe, durable storage, and processing of events as they occur or retrospectively
LicenceRedis 8 and later: tri-license (RSALv2 / SSPLv1 / AGPLv3, user's choice); 7.4.x to 7.8.x dual RSALv2/SSPLv1; 7.2.x and earlier BSD3See the Apache Kafka project site for current license terms
Managed offeringsRedis Cloud, plus managed Redis services from the major cloud providers (check each provider's current product naming)Fully managed Kafka services from a variety of vendors, or self-managed
Current release (late Nov 2026)Redis 8.12, released 22 November 2026Kafka 4.4.0, released 22 October 2026

Messaging models: Pub/Sub and Streams vs topics and partitions

Redis offers two different messaging primitives. Pub/Sub is fire-and-forget: a message goes only to clients subscribed at the moment it is published, and nothing is stored. Redis Streams behave like a log: entries are appended with an ID, kept until trimmed, and can be read by multiple independent readers or by a consumer group that splits work among members.

Kafka has one core abstraction, the topic, split into partitions. Order is guaranteed only within a partition, and partitioning is the main lever for parallelism. The Kafka documentation describes three capabilities: to publish (write) and subscribe to (read) streams of events, to store streams of events durably and reliably for as long as you want, and to process streams of events as they occur or retrospectively.

# Redis Streams: write an entry, then read as part of a consumer group
XADD orders * order_id 1042 status created
XGROUP CREATE orders order-workers $
XREADGROUP GROUP order-workers worker-1 COUNT 10 STREAMS orders >
XACK orders order-workers 1700000000000-0
# Kafka: inspect consumer group lag from the CLI
kafka-consumer-groups.sh --bootstrap-server localhost:9092 \
  --describe --group order-workers

Persistence and retention

Redis is memory-first. RDB snapshots and the append-only file (AOF) protect against process restarts, but a Stream still lives in memory and grows until it is trimmed with XTRIM or bounded with MAXLEN on write. Unbounded Streams are a common operational mistake because memory, not disk, is the limiting resource.

Kafka retains records on disk for a configured window (time-based retention.ms or size-based limits) regardless of whether any consumer has read them, which makes replay and late-joining consumers practical. Log compaction is a separate mode that keeps only the latest record per key, useful for change-data-capture style topics rather than plain event logs.

In short: Redis retention is a memory-management decision you must actively bound; Kafka retention is a disk-based policy designed to let consumers lag or replay.

Consumer groups and delivery semantics

Both systems have consumer groups, and the term means different things. In Redis Streams, a group tracks a pending entries list (PEL); any member can be handed any unclaimed entry, and a crashed consumer's pending entries can be reclaimed with XCLAIM or XAUTOCLAIM. There are no partitions, so parallelism within one stream depends on how work is divided among group members.

In Kafka, a consumer group commits offsets per partition, and the group coordinator rebalances partition ownership when members join or leave. Because each partition belongs to one consumer at a time, ordering within a partition holds even under high parallelism. Kafka's transactional producer and read-committed isolation level can provide exactly-once processing within a pipeline. Redis Streams are generally used with idempotent consumers so that at-least-once delivery is safe.

Throughput and operations trade-offs

Throughput figures depend on hardware, configuration, and workload shape, and benchmark numbers go stale quickly, so treat headline numbers with caution. In general terms, Redis keeps data in memory and optimizes for low latency per operation, with throughput bounded by available RAM and the server's command-processing capacity. Kafka is built for sustained, disk-backed throughput and is usually the better fit when total event volume or retention window would not fit comfortably in memory.

Operationally, a single Redis instance or small cluster is simple to run, and most teams already operate it for caching, so adding Streams has low marginal overhead. Kafka requires managing brokers, partition counts, replication factor, and consumer lag. Older Kafka deployments depended on ZooKeeper for coordination, and the KRaft mode removes that dependency. With Kafka 4.4.0 released on 22 October 2026 and the 4.3.x bugfix line at 4.3.2 (23 October 2026), the 4.x line is current, so check the documentation for the recommended mode before building a new cluster.

On the Redis side, the current line is Redis 8.12 (22 November 2026, patch 8.12.0). Redis 8 added a Vector set data structure for high-dimensional similarity search, plus HGETEX, HSETEX, and HGETDEL for field-level hash expiration, and it ships Search, JSON, TimeSeries, and Bloom as integral components. Running Kafka well at any scale still demands more dedicated operational attention than running Redis.

Licensing: Redis, Valkey, and Kafka

Redis licensing has changed direction more than once. Redis 7.2.x and earlier were BSD3. Starting with Redis Community Edition 7.4.x (first released 29 July 2024) and through 7.8.x, Redis Ltd. licensed the core server under a dual RSALv2 / SSPLv1 license. Neither is an OSI-approved open source license; RSALv2 forbids commercializing the software or providing it to others as a managed service, and forbids removing licensing or copyright notices.

Starting with Redis 8, Redis Ltd. offers Redis Open Source (the renamed Community Edition) under a tri-license: users may choose RSALv2, SSPLv1, or AGPLv3, the last of which is an OSI-approved open source license. The former add-on modules (Search, JSON, TimeSeries, Bloom) are now part of Redis Open Source under the same tri-license. Redis proprietary products are closed source and require a commercial license from Redis Ltd.

A community fork named Valkey was launched following the license change; see valkey.io for its governance and license. Apache Kafka is an Apache Software Foundation project; confirm its current license terms on the project site. Because Redis terms have shifted before, verify the current license on the vendor's licensing page before making a licensing-sensitive decision.

Migration, coexistence, and when to pick each

Redis and Kafka solve different problems, so a straight migration between them is uncommon; the usual move is re-scoping which workloads live where. A team that outgrows Redis Streams for event distribution can keep Redis for caching and low-latency signaling and add Kafka as the durable event log, bridging the two with a small consumer that reads from Redis and republishes to Kafka, or with Kafka Connect if a ready-made connector fits the surrounding systems. If Kafka is too heavy for a single lightweight queue, one option is to move that one workload to Redis Streams rather than run a cluster for a job that does not need multi-service durability.

  • Pick Redis when you need low-latency pub/sub or a lightweight queue, you already operate Redis for caching, and losing a rare message or capping history is acceptable.
  • Pick Kafka when multiple independent services must consume the same event history, you need long retention with replay, or you need strict per-partition ordering and exactly-once processing at scale.
  • Run both when a system needs fast ephemeral signaling (Redis) layered over a durable event backbone (Kafka) that other services depend on.

If you choose Redis for a long-lived pipeline, also pick the version deliberately: Redis 8.12 is the current release line, and the sources describe different release types with different support windows.

Common questions

Can Redis Streams replace Kafka for event streaming?

For small-scale or single-application messaging, yes. For event streaming shared across many independent services with long retention, replay, and strict per-partition ordering at scale, Kafka is the better-suited design.

Is Redis or Kafka better for a simple background job queue?

Redis is usually simpler and lower-latency for a basic job queue, especially if you already run it for caching. Kafka is worth the operational overhead only if the queue needs long retention, replay, or several independent consumer systems.

What is Valkey and how does it relate to Redis?

Valkey is a community fork of Redis started after the 2024 license change. See valkey.io for its current license, governance, and compatibility claims.

Do Redis Streams guarantee the same durability as Kafka?

Not by default. Redis Streams live in memory and rely on RDB/AOF persistence and replication, while Kafka stores events durably and reliably on disk as part of normal operation. Kafka's durability model is generally stronger out of the box.

Is Redis still open source?

It depends on the version and the license you choose. Redis 7.4.x to 7.8.x are dual-licensed RSALv2/SSPLv1, which are not OSI-approved, while Redis 8 and later also offer AGPLv3, an OSI-approved option, alongside RSALv2 and SSPLv1.

Sources

  1. Apache Kafka documentation
  2. Redis licenses
  3. endoflife.date: Redis release cycles
  4. Apache Kafka release announcements

About this page

Last reviewed December 2, 2026 by the Nine Bits editors. Read our editorial policy or report an error.