The worker side of a notification: it performs the delivery the request decided on.
It runs the same code the inline path runs, which is what makes a retry mean exactly what the first
attempt meant. The payload carries the template key and its params rather than a rendered body, so
a message queued before a translation was fixed goes out fixed.
It throws when, and only when, another attempt could work. That is the whole contract with the
queue: a permanent failure that threw would be retried until the attempts ran out, filling the
queue with work that cannot succeed, and an unreachable recipient would look like an outage.
The worker side of a notification: it performs the delivery the request decided on.
It runs the same code the inline path runs, which is what makes a retry mean exactly what the first attempt meant. The payload carries the template key and its params rather than a rendered body, so a message queued before a translation was fixed goes out fixed.
It throws when, and only when, another attempt could work. That is the whole contract with the queue: a permanent failure that threw would be retried until the attempts ran out, filling the queue with work that cannot succeed, and an unreachable recipient would look like an outage.