3 ms·
Could have just called an API but instead we fired an SNS event. Sigh.
by datavirtue 4y ago
Could have just called an API but instead we fired an SNS event. Sigh.
- notyourwork 4y agoHow many times I've had this discussion. Let's publish a notification, and let's have the message receiver call some API. Why not just call the API from the place where you want to publish the message? Because we need this SNS message queue.
- jquast 4y agoProbably because the API can be unreachable, timeout, etc — with a message queues it can be redelivered without permanently dropping customer data or whatever with only a stack trace to remember it by
- notyourwork 4y agoThat's naive without any context to claim. You have to know the source that triggers the code to publish the message, what the message is for, the fault tolerance and availability of the API we're calling before you can even begin to decide. Which you validated perfectly by giving a snarky "what about redundancy" answer to a complicated question.