A utility billing worker crashes after consuming a Queue message but before deleting it. What happens when visibility ends, and what design duty follows?
Select an answer to reveal the explanation.
Short Explanation
Delete is what completes Queue work. If the consumer crashes or never deletes, visibility ends and the message returns—delivery count goes up. Design handlers to be safe if they run twice. Streaming’s “read does not remove” is a different model.
Full Explanation
Official Queue durability keeps a message until delete or retention expiry. Failed or forgotten deletes cause redelivery after visibility ends, incrementing delivery count. Consumers must be idempotent. Consuming is not a destructive permanent remove. Streaming retains records for replay regardless of read; that contrast highlights why Queue requires an explicit delete to finish work.