Comparison · RabbitMQ

RabbitMQ vs Redis Compared

RabbitMQ is an open-source message broker. Redis is an in-memory key-value data store, most often used as a cache, that also offers Pub/Sub, Lists and Streams, which is why the two end up on the same shortlist for job queues and event fan-out. This page compares them head to head as messaging systems, on what each project's own documentation says they guarantee.

Tyler Eastridge

By Tyler Eastridge, Head of Operations

LinkedIn · Updated

6 min read6 sections
On this page
Short answer

Short answer

Choose RabbitMQ when a lost message has a cost. It confirms a publish only after a durable queue has written it to disk, or a majority of quorum queue replicas have accepted it, and routing, dead-lettering, TTLs and priorities are broker configuration rather than code. Choose Redis when it is already in the stack, jobs are short-lived and re-running one is acceptable: Streams are simple and fast, but durability depends on persistence settings and replication is asynchronous. Redis Pub/Sub stores nothing and should never carry work that must be done.

RabbitMQ and Redis as messaging systems, on the same criteria

RabbitMQ and Redis as messaging systems, on the same criteria
RabbitMQRedis
What it isAn open-source message broker speaking AMQP: exchanges route messages into queues and streamsAn in-memory key-value data store with Pub/Sub, Lists and Streams
Delivery guaranteeAt least once with publisher confirms and manual acknowledgementsPub/Sub at most once; Streams with consumer groups at least once
Where messages liveOn disk; quorum queues never hold message bodies in memoryIn memory, with optional RDB snapshots and an append-only file
Loss window on a crashNone for confirmed messages in durable or quorum queuesAbout one second with the default AOF policy; minutes with RDB alone
ReplicationRaft for quorum queues and streams; confirmed once a majority holds itAsynchronous; Redis Cluster can lose acknowledged writes
RoutingDirect, fanout, topic and headers exchangesNone; the producer chooses the key or channel
Failure handlingDead-letter exchanges, TTL, delivery limits, consumer timeoutsPending Entries List and XAUTOCLAIM; dead-lettering is application code
Wins whenMessages carry obligations, routing is non-trivial, backlogs can outgrow RAMRedis is already there and latency matters more than guarantees
Table · RabbitMQ and Redis as messaging systems, on the same criteria. Scroll sideways on small screens.

Delivery guarantees and acknowledgements

RabbitMQ's guarantee comes from two acknowledgements. A publisher confirm for a persistent message routed to a durable queue is sent only after the message is on disk, and for a quorum queue only after a majority of replicas accept it. Manual consumer acknowledgements keep a message queued until the consumer is done, and unacknowledged messages are requeued if the channel closes. RabbitMQ's documentation calls that combination at-least-once and describes automatic acknowledgement as fire-and-forget.

Redis has three mechanisms with three answers. Pub/Sub is at most once: a subscriber that is disconnected or fails mid-message never sees it again. Lists with BRPOP lose a job if the consumer crashes after popping it; the documented fix is BLMOVE into a processing list, cleared with LREM when the work is done. Streams with consumer groups track delivered entries in a Pending Entries List until XACK, and XAUTOCLAIM hands a dead consumer's entries to a live one. That is at-least-once, and Redis 8.6 added idempotent production so producer retries do not write duplicates.

Persistence and replication

Redis keeps the dataset in memory. RDB snapshots are point-in-time, and the Redis persistence guide says to expect to lose the latest minutes of data after an unclean stop; the append-only file with the default appendfsync everysec cuts that to about one second. Replication is asynchronous, and Redis's documentation says WAIT does not make it strongly consistent and that Redis Cluster can lose writes it acknowledged during a failover.

RabbitMQ quorum queues use Raft, so losing one node of three loses nothing that was confirmed. They never keep message bodies in memory, so a backlog is bounded by disk rather than RAM. Classic mirrored queues were removed in RabbitMQ 4.0.

Complex routing, retries and dead letter queues

In RabbitMQ a producer publishes to an exchange, and bindings decide which queues get a copy: by exact key, topic pattern, header match or to all. A new consumer that needs a subset of traffic is a new binding, not a producer change. Failure handling is configuration too: dead-letter exchanges, message and queue TTL, a delivery limit that dead-letters poison messages after 20 attempts by default on quorum queues, consumer timeouts and, as of RabbitMQ 4.3, strict priorities on quorum queues. Redis has no routing layer. Fan-out means several consumer groups on one stream, and retry limits and a dead-letter destination are code you maintain, usually driven by the delivery count XPENDING reports.

Redis Streams vs RabbitMQ streams

Both are append-only logs that consumers read by position and can replay. A RabbitMQ stream is always persistent and replicated, stored on disk and retained by size or age, with non-destructive reads and super streams for partitioning. A Redis Stream is a key in memory, trimmed by length or minimum ID, and its consumer groups add per-entry acknowledgement, so one stream works as both a short log and a work queue. Redis Streams suit a bounded window of recent events that fits in RAM; RabbitMQ streams suit long retention and wide fan-out. For long-lived event logs, see RabbitMQ Streams vs Apache Kafka.

Throughput, latency and operations

Most published benchmarks compare an unacknowledged in-memory push with a durable, replicated, acknowledged delivery. To compare like for like, test Redis with the persistence and WAIT settings your loss tolerance needs against RabbitMQ quorum queues with confirms, on your own message sizes. Include two effects: an RDB fork can pause Redis for milliseconds, or up to a second on a very large dataset, and RabbitMQ blocks publishers when it crosses a memory or disk watermark.

Operationally, RabbitMQ runs as a three or five node cluster with a management UI and per-queue metrics. Redis is quicker to stand up, but as a queue it needs RAM for the peak backlog plus fork headroom, the noeviction policy so queued work is never evicted, and Sentinel or Redis Cluster for failover. Redis 8 added AGPLv3 as a license option and Valkey is the BSD-licensed fork; Valkey vs Redis covers that choice.

When to use RabbitMQ and when to use Redis

  1. Would a lost message end up in an incident report or a contract dispute? RabbitMQ with quorum queues and confirms.
  2. Do consumers need different subsets of the same traffic? RabbitMQ exchanges.
  3. Could a consumer outage build a backlog bigger than the RAM you will buy? RabbitMQ.
  4. Is Redis already in production, with short-lived jobs that can be re-run? Redis Streams with consumer groups, never Pub/Sub.
  5. Is the job a cache, session store or real-time counter? Redis, which is what it was built for.

Many architectures run both; Redis and RabbitMQ together covers that split, and Redis as a message queue goes deeper into Lists, Pub/Sub and Streams.

Frequently asked questions

Is RabbitMQ or Redis better as a Celery broker?

Celery lists both as stable brokers. The difference is redelivery: with Redis, Celery redelivers any task not acknowledged within the visibility timeout, one hour by default, so long ETA or countdown tasks can run twice unless you raise it. With RabbitMQ, an unacknowledged task returns when the worker's channel closes or the broker's consumer timeout fires.

Is Redis faster than RabbitMQ?

For raw operations, usually, because Redis works from memory. The comparison only means something when both do the same work, with persistence, replication and acknowledgements set to the same loss tolerance. Measure that on your own message sizes.

Can Redis Streams replace RabbitMQ?

For a simple work queue or a short event log that fits in memory, often yes. Streams give consumer groups, acknowledgements and claiming of stuck entries. They do not give exchange routing, dead-lettering, TTLs, priorities or disk-bounded backlogs, so those become application code.

Does RabbitMQ keep messages in memory like Redis?

No. Quorum queues never keep message bodies in memory and streams are stored on disk. RabbitMQ uses memory for indexes and connections, and blocks publishers when memory crosses its watermark rather than dropping messages.

RabbitMQ services

Where this gets done

The work behind this page, run by the same engineers who wrote it.

More resources

Other RabbitMQ guides, comparisons and research

From the blog

Recent RabbitMQ articles

Next step

Need this done on your cluster?

AceMQ's senior RabbitMQ engineers support 130+ enterprise clients in 26+ countries under a 15-minute emergency SLA, with direct escalation to the RabbitMQ core team.