Queue vs event vs worker?
Understand the concept
A queue holds work waiting to be processed, a worker executes that work, and an event describes a fact that already happened. Commands request an action, while events can notify multiple interested consumers. Delivery and acknowledgement rules determine what happens when workers crash or messages are repeated.
Important ideas
-
A queue holds work; a worker processes it.
-
An event describes something that happened, such as
OrderCreated. -
Delivery may repeat, so consumers need safe duplicate handling.
-
Persist processing state before acknowledging when loss would be unacceptable, and use operation IDs to recognize repeated delivery.
Can you explain it without the notes?
Queue vs event vs worker?
Use your own words. Explain an example and one limitation before checking the explanation.
Check your explanation
A queue holds work waiting to be processed, a worker executes that work, and an event describes a fact that already happened. Commands request an action, while events can notify multiple interested consumers. Delivery and acknowledgement rules determine what happens when workers crash or messages are repeated.
Turn this concept into a clear answer.
- Separate delivery guarantees from business-effect guarantees; duplicate delivery can be normal even in a healthy system.
Keep connecting the ideas.
Next lesson: How do I design retries and dead-letter handling?Adapted from 07_SYSTEM_DESIGN_ARCHITECTURE.md · “Queue vs event vs worker?”. Examples are study fragments; framework behavior can depend on your version.