Questions: At-Least-Once Delivery Semantics

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A payment service receives a 'charge $100' message via a queue with at-least-once delivery. The charge is processed successfully, but the acknowledgment is lost in the network. What happens next, and what is the consequence?

AThe sender marks the transaction failed and requires the user to retry manually
BThe message is redelivered and, without deduplication logic, the customer is charged again
CThe queue detects the duplicate and automatically cancels the second charge before it is processed
DThe sender waits indefinitely for an acknowledgment without ever retransmitting
Question 2 Multiple Choice

Which property of an operation makes it safe to use with at-least-once delivery without explicit deduplication logic?

ACommutativity — the operation can be applied in any order without changing the result
BIdempotency — applying the operation multiple times produces the same result as applying it once
CAtomicity — the operation completes fully or not at all
DDeterminism — the operation always produces the same output for the same input
Question 3 True / False

At-least-once delivery is strictly stronger than exactly-once delivery because it guarantees nearly every message arrives, while exactly-once mainly guarantees messages are not duplicated.

TTrue
FFalse
Question 4 True / False

The fundamental reason at-least-once delivery can produce duplicate messages is that a sender cannot determine whether a missing acknowledgment means the message was lost or the acknowledgment was lost.

TTrue
FFalse
Question 5 Short Answer

Explain why idempotency at the application layer is often preferred over exactly-once delivery at the transport layer as a solution to the duplicate message problem.

Think about your answer, then reveal below.