← Back to the chapter

Technical detail · AMQP Reliability: Persistence and Routing Patterns

Count queued exposure and storage wait

If QQ transient messages remain queued at restart, up to QQ are at risk. At 200 B per payload, their payload subtotal is Q×200Q \times 200 B. Measure QQ immediately before restart, rather than counting every message that passed through the broker.

For the sizing model, assume about 5 ms per individual fsync or 0.5 ms amortized with batched writes. At 500 messages/s, an assumed serialized 0.5 ms wait per message gives 250 ms of waiting per second. It does not establish 25% utilization of one CPU core. Disk wait, CPU work and recovery elapsed time are different measurements.

The original calculator’s 259 GB total counts all messages published over 30 days. That is not a restart-loss estimate unless those messages all remain queued. Its zero-loss display is also conditional, rather than a guarantee through every storage failure. Measure recovery with the actual backlog, queue type and storage system. Weigh the measured write cost against vulnerable queued work, and retain retry and deduplication for unconfirmed publishes.

← Back to the chapter