← Questions

Order service whose database write succeeds but queue publish fails

0
DatabricksSystem designLast asked Aug 2026

Design the order path of an online bookstore. When an order request arrives, the service inserts the order into its database and then publishes a message to a queue (Amazon SQS) so other parts of the system can process the order asynchronously.

  1. The database insert succeeds but the publish fails. What goes wrong, and how do you make sure every saved order is eventually published?
  2. Consumers can receive the same message more than once. How do you keep an order from being processed twice?
Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing