An application consumes messages from a producer tier, and the consumer tier is sometimes temporarily unavailable. During that downtime, messages must not be lost. Which architecture pattern achieves this?
Show answer and explanation
Answer: B
Inserting SQS converts a hard availability dependency into a buffer: producers keep appending messages while the consumer is down, and the consumer drains the accumulated backlog when it recovers. Messages are durably stored across multiple Availability Zones, with retention configurable up to 14 days so nothing expires during a routine outage window.
This decoupling is the canonical pattern for workloads that must tolerate consumer downtime without message loss.
Why the other options are wrong
- A. Direct REST calls simply fail while the consumer is unreachable, and retry loops risk timing out or stampeding the tier on recovery rather than holding the work durably in the meantime.
- C. A synchronous Lambda invocation expects a response in the call itself, so if the function is unavailable the producer request fails — the same availability coupling as a REST call.
- D. SNS pushes each message to subscribers at publish time; a consumer that is not healthy in that moment misses the message unless the subscription is an SQS queue, which just reintroduces the queueing pattern the question is asking about.