Which of these are valid delivery guarantees for a message queue? Select all that apply:
a) At-most-once — a message may be lost, but it is never delivered more than once
b) At-least-once — a message is not lost, but it may be delivered multiple times
c) Exactly-once — each message is processed exactly once, although this is difficult to achieve in practice
d) Best-effort — the system tries to deliver messages but makes no formal guarantee
I selected only at-least-once and was marked wrong. I understand that different systems may offer different settings, but I am unsure whether at-most-once, exactly-once, and best-effort should all count as legitimate guarantees.
2 Answers
At-most-once is definitely a valid guarantee: the system acknowledges or removes the message without retrying, so duplicates are avoided at the cost of possible loss. That can be useful when processing the same event twice is more harmful than missing one—for example, accidentally charging someone twice. Exactly-once is much harder because failures can happen between processing a message and recording that it was processed. In practice, consumers usually make their operations idempotent instead of relying entirely on exactly-once delivery.
Best-effort is possible in practical systems, especially where occasional loss and duplicates are acceptable. For example, a sensor pipeline might drop queued readings when its connection is overloaded because long delays are worse than missing a few samples. It may retry some messages and produce duplicates, but it does not promise either delivery or uniqueness. The only ambiguity is whether a quiz expects “guarantee” to exclude best-effort because best-effort explicitly provides no formal guarantee.
So the safest quiz answer is likely a, b, and c, with d depending on how literally the question uses the word “guarantee.”

The payment example helped. I was treating message loss as automatically worse, but sometimes preventing duplicate processing is the more important guarantee.