datarekha
Data Engineering Medium Asked at LinkedInAsked at AmazonAsked at UberAsked at Netflix

What is the difference between a message queue and an event stream?

The short answer

A queue usually distributes work among competing consumers: a worker receives or leases a message, acknowledges success, and retries failure. A stream retains an ordered event log for a retention period; consumers track offsets and independent consumer groups can replay the same events. Choose by retention, replay, ordering and consumer semantics rather than product name.

How to think about it

A queue answers who will complete this job? Competing workers receive messages, acknowledge successful work and retry failures. Standard SQS is at-least-once, so consumers must be idempotent.

A retained stream answers which consumers need this event history? Consumer groups maintain offsets and several applications can independently read or replay the same ordered events.

Learn it properly System design boundaries

Keep practising

All Data Engineering questions

Explore further

Skip to content