Addressing Idempotence
Here’s the deal. SMTP[56] is a wonderful protocol when it comes to getting emails from one machine to another. Most of the time it just works. But when it doesn’t, well, we really won’t be able to tell.
If we have our own SMTP server, we could guarantee that we sent the message, but it could fail to arrive because of the many hops it would have to go through across the internet. If we use a third-party email provider, we can send a request to that provider. That request could fail after the provider has already sent the email. So if we tried again, it might get sent twice. So what do we do?
This is why you work with your business team.
Which failure case is worse? Not sending an email, or sending it more than once? Is ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access