Work out queue throughput sizing instantly with clear inputs, formula shown and shareable results.
Messages in flight follow Little's law — arrival rate times processing time — and consumer count is that divided by per-consumer concurrency. The visibility timeout must comfortably exceed processing time, ideally by three times or more, because a message whose timeout expires mid-processing is redelivered and processed twice.
Queue sizing
in flight = message rate x processing time; consumers = ceil(in flight / concurrency per consumer); visibility timeout should exceed 3x processing time
The message becomes visible again while still being processed, so another consumer picks it up. Duplicate processing follows, which is why handlers must be idempotent.
No. A long timeout delays retry after a genuine consumer crash, so a failed message sits invisible for that whole period. Heartbeat extension is the better approach.