Choose the best description of why message queues are used in distributed systems.
Think about how systems handle tasks that don't need immediate response.
Message queues allow components to send messages without waiting for immediate processing, enabling asynchronous communication and decoupling.
Identify the part of a message queue system that guarantees messages are not lost even if the system crashes.
Consider where messages are saved to survive failures.
The message broker uses persistent storage (like disk) to save messages so they survive crashes and restarts.
Choose the best approach to scale a message queue system to handle millions of messages per second reliably.
Think about dividing work to avoid bottlenecks.
Partitioning the queue into shards allows parallel processing and avoids single points of congestion, improving throughput and reliability.
Select the correct tradeoff between these two delivery guarantees.
Consider the complexity and message duplication risks.
At-least-once delivery can lead to duplicates but is simpler; exactly-once avoids duplicates but needs complex coordination like idempotency or transactions.
Calculate the approximate disk storage required to retain all messages for 7 days.
Calculate total messages in 7 days and multiply by message size.
10 million messages/hour × 24 hours × 7 days = 1.68 billion messages. Each 1 KB means 1.68 TB storage needed.