Questions: Message Passing IPC: Semantics and Guarantees

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A payment service uses a message queue. Occasionally a network failure causes the same payment message to be delivered and processed twice, charging a customer's card two times. Which delivery semantic does this queue implement, and what is the recommended mitigation?

AExactly-once delivery; the fix is to use a more reliable network connection
BAt-most-once delivery; the fix is to add retransmission until an acknowledgment is received
CAt-least-once delivery; the fix is to make payment processing idempotent — assign each message a unique ID and ignore duplicate deliveries
DFIFO ordering violation; the fix is to add sequence numbers to messages
Question 2 Multiple Choice

A developer chooses a blocking send over a non-blocking send in a producer-consumer pipeline. What is the key tradeoff?

ABlocking send is faster because it bypasses the message queue buffer entirely
BBlocking send synchronizes producer and consumer at the communication point, preventing the producer from outrunning the receiver, but the producer must wait idle until the receiver is ready
CBlocking send automatically guarantees exactly-once delivery, while non-blocking send does not
DBlocking send requires FIFO ordering while non-blocking send allows priority-based message reordering
Question 3 True / False

Two message-passing systems can have identical send/receive API calls yet differ completely in their delivery reliability guarantees.

TTrue
FFalse
Question 4 True / False

At-least-once delivery is typically safer than at-most-once delivery because very likely delivery prevents data loss.

TTrue
FFalse
Question 5 Short Answer

Why is exactly-once delivery expensive to implement compared to at-least-once, and what application-level technique substitutes for it?

Think about your answer, then reveal below.