Retry the timeout, never the dead token
transcript
Two sends fail at the same moment. The text message timed out. The push token was revoked. Same error handling? That is the mistake.
Every channel adapter answers with one of three results. OK means it went. Retry means a temporary failure, like a timeout. Permanent means a dead end. A bad number, a revoked token.
A revoked token never works again. Retrying it only burns quota and delays nothing useful. So it is failed at once, with no retry.
A timeout may work next time. Wait thirty seconds. Fails again? Wait sixty. Doubling each time, up to a cap. After three attempts the delivery is failed.
The retry is not a sleep. The service schedules the next attempt. It goes back in a queue, due at now plus the wait.
Retry what can recover. Stop what cannot.
The full design is in the lecture. Channels, rules, retries and dedupe.