Overview

A message queue and an event log both move data from producers to consumers, but they differ in what happens after a message is read. A queue treats delivery as a one-time handoff where each message is consumed once and then removed, while an event log keeps every event in an ordered, replayable sequence that multiple independent readers can consume at their own pace. This distinction drives how each handles multiple consumers, failure recovery, and historical reprocessing.

Comparison Diagram

QueueEvent LogProducerFIFO bufferConsumermessage deleted after ackProducerappend-only log (retained)01234Consumer A(offset 1)Consumer B(offset 3)each consumer tracks its own offset

Comparison Table

AspectQueueEvent Log
Write pathProducer sends the message directly to the queueProducer appends the event to the end of the log
Storage structureTransient buffer of discrete messagesAppend-only, ordered, persistent sequence
Consumption mechanicConsumer pops/dequeues a message and acknowledges itConsumer reads sequentially and tracks its own offset
Multiple consumersCompeting consumers — each message goes to only one consumerBroadcast — every consumer group gets its own full copy of the stream
Retention after readMessage is deleted once acknowledgedEvent stays retained per policy regardless of who has read it
Replay capabilityNot possible without re-publishing the messageTrivial — reset the offset and re-read from any point
Ordering guaranteeFIFO within the queue, but no guaranteed order across consumersStrict order guaranteed within a partition
Failure recoveryFailed messages route to a dead-letter queue for retryConsumer resumes by rewinding to its last committed offset

Key Differences

  • A queue’s message disappears after acknowledgment; a log’s event stays put
  • Queues split work across competing consumers; logs broadcast to every consumer group
  • Logs support full replay from any offset; queues generally don’t
  • Log ordering is partition-scoped and strict, while queue ordering is best-effort across consumers
  • Queues excel at task distribution; logs excel at event sourcing and stream processing

When to Use Each

Queue

  • Task distribution: Spread discrete units of work across a pool of workers where each task should be handled exactly once.
  • Request buffering: Smooth out bursts between a fast producer and a slower downstream service without needing history.
  • Simple decoupling: Decouple two services with minimal operational overhead when neither replay nor multi-consumer fan-out is required.

Event Log

  • Event sourcing: Rebuild application state by replaying the full history of events from the beginning of the log.
  • Multiple independent consumers: Let several services — analytics, search indexing, notifications — each read the same stream at their own pace.
  • Stream processing pipelines: Support windowed aggregations and joins that need to reprocess historical events.