Try
↑ ↓ move↵ openesc close

Interview prep / Delivery guarantees

Junior · Delivery guarantees · System design interview question

What is an ack timeout, and what goes wrong if it is set too short or too long?

Sketch your own answer first, then compare it with the one below.

A strong answer

It is the time the broker waits for an acknowledgement before it assumes the consumer failed and hands the message to another one. Some brokers call it a visibility timeout.

Too short, and a slow but healthy consumer has its message redelivered while it is still working, so the work is done twice. Too long, and when a consumer really dies its messages sit unclaimed for that whole time.

Set it from the slowest normal processing time plus margin. Some brokers let a consumer extend the timeout while work continues, which avoids one long fixed value.

Sources

Learn it by running it

The delivery guarantees lesson explains the mechanism behind this question, and its lab lets you change the parameters and watch the effect.

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms