Asynchronous Communication 00:00:01 Ask for a report and take a numbered ticket A library member requests an archive report that takes a minute to assemble. The front desk durably accepts the request and hands back a status link. The member can leave while the work continues. The user asks for a report. The API stores a job and answers 202 with a status link. A worker builds the report. The status link says working. The worker stores the file, and the user gets a notification with a link. The receipt promises accepted work according to the service contract. It should lead to a visible completed, failed or cancelled outcome with a defined retention period. 00:00:43 Follow one envelope across the handoff The producer sends an envelope and the broker confirms receipt. A consumer later handles that envelope and acknowledges it. Notice the distinct moment when the user's request returns and when its intended effect becomes real. The producer sends M1 and gets a confirmation from the queue. The producer answers its user at once and sends M2 and M3. No email has been sent yet. The work is done, so M1 is acknowledged and removed. M2 and M3 follow. The line is empty and the consumer waits for more. In the work-queue example, acknowledging normally removes the item from future delivery. Logs may retain records beyond consumer acknowledgment. Describe the mechanism your service actually uses. 00:01:35 A buffer buys time, then the queue grows Two messages arrive each second but the lone worker completes only one. Buffering decouples caller response time from worker speed for a while. It cannot permanently close a capacity deficit. 2 messages a second arrive, 1 a second is processed. 20 sent, 10 processed, 10 waiting. 60 wait. A new message waits about 60 seconds for its turn. Now 3 a second are processed. The line shrinks by 1 a second and is empty after 60 seconds. Measure the age of the oldest waiting message as well as the count. Add enough capacity to handle incoming work and consume the backlog within the promised delay. 00:02:21 The same envelope reaches another worker A worker commits a charge and loses its acknowledgment. A replacement sees the same envelope because the broker cannot inspect the payment transaction. The repeat is normal under at-least-once delivery. Worker 1 receives message 7. The queue hides it from others. The id 7 and the charge are saved in one transaction. The visibility timeout ends. Worker 2 receives message 7. The insert finds id 7, so nothing is charged. Worker 2 acknowledges. Use a stable identity and a destination that records the charge and its deduplication decision together. For an external provider, route retries through its supported idempotency contract. 00:03:06 One damaged envelope cannot occupy the desk forever A message with a permanently invalid address keeps failing. Repeating it immediately spends worker capacity while legitimate reports wait. A retry policy needs deadlines, backoff and a visible final destination. Message 9 fails. It is not acknowledged. It comes back after a delay, fails again, and once more. After three tries the message moves to the dead letter queue. Message 10 is processed. Somebody repairs and replays message 9 later. Keep a failure reason and a repair-and-replay procedure. An asynchronous interface is complete when you can explain acceptance, recovery from duplicates, backlog, and the outcome the waiting member sees.