Practice — Message Queues & Event Streaming (5 questions)
Intermediate
Open
Free
Choosing Between a Queue and a Log Permalink →
Your team is adding asynchronous processing to two different features:
- Feature A: image uploads. Each upload must be resized into three sizes by a pool of workers. Nobody else cares about the event, and once the resize is done the message has no further value. Some resizes take 30 s; occasionally a corrupt file crashes the worker.
- Feature B:
OrderStatusChangedevents. Fulfilment, email, fraud scoring and a data-warehouse loader all need every event, events for one order must be seen in order, and the warehouse team wants to reload the last 30 days after a bug fix.
- Which messaging model (consume-and-delete queue vs log-based stream) fits each feature, and why?
- For Feature A, what mechanism prevents a slow-but-healthy 30 s resize from being handed to a second worker, and what mechanism handles the corrupt-file case?
- For Feature B, what would you use as the partition key and what ordering guarantee does that give?
Share this question