Skip to content
StackDecode
System Design
9. Message Queues and Event-Driven SystemsAnimated

Message Persistence

Storing messages on disk.

The idea

Persisted messages survive broker restarts, at some performance cost.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

ProducerEvent brokerBillingEmailAnalytics
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

A service publishes an event: "OrderPlaced".

step:
1/4
at:
Producer
1/8

The green dot is a request moving through the system.

Step by step

  1. 1Write to the log
  2. 2Replicate
  3. 3Acknowledge the producer
  4. 4Deliver to consumers

Where it is used

Important messages.

Watch out for

Disk and replication add latency.

Related