Where a message goes when it cannot be sent and cannot be dropped
A message that cannot be retried must not be retried forever and must not vanish. It goes to a parking lot with the reason attached, visible to the person whose message it was, and the reason has to be in words rather than a code.
The three ends a message can have
| End | Meaning | Who needs to know |
|---|---|---|
| Sent | It left | Nobody |
| Retryable failure | Try again shortly | Nobody, until it stops being retryable |
| Permanent failure | It will never send | The person who sent it, now |
The third row is the one systems get wrong, usually by logging it and moving on.
What to keep with the message
- The provider's error verbatim, code and subcode.
- A sentence a non-engineer can act on. "This person last wrote more than 24 hours ago" is actionable;
error_subcode 2018278is not. - How many attempts were made and when.
- Enough to resend it later - because a token problem, once fixed, makes a whole parking lot suddenly sendable.
Resending a parked message needs care. A delivery notification that failed on Monday and gets replayed on Thursday tells the customer their parcel is on its way three days after it arrived. Some parked messages should expire rather than be replayed, and that decision belongs to the message type.
Alert on the shape, not the count
One parked message is normal. A hundred parked messages that all share a failure reason is an incident, and the reason names it: all token errors is an access problem, all closed windows is a queue problem, all invalid recipients is a data import. This is the same signal as watching the failure mix, seen from the other end.
Give it an owner
A parking lot nobody looks at is a slower way of dropping messages. It needs a person, a routine, and a number on a screen somebody sees daily - otherwise it fills up quietly and its first reader is an auditor.
Questions people actually ask
What is a dead letter queue?
Somewhere a message goes when it has failed in a way that retrying will not fix, so it is neither retried forever nor silently dropped.
Should a customer see failed messages?
Yes, with the reason in words. A failure only the vendor can see is a message the customer believes was delivered.
Njiwa
One inbox for WhatsApp, Facebook and Instagram, and an API that sends over either WhatsApp rail. 7 days free, no card.