Open samirrayani opened 3 months ago
wow this is funny…
!!!
whoa maybe I should start using queues more? I would always just default to creating an event and add some concurrency but that's a pretty big diff
Well, it depends, queues are for for when you don't want concurrency. They are designed for throttling "first in first out". An example would be you need to call an API but are rate limited to 1 request per second. If you have two users making requests one will get throttled and fail…unless if you use a queue and enqueue requests to throttle them (on your side) to 1rps.
Events are the opposite. The pattern is "fan out" when you want to 1-many broadcast as fast as possible.
aha! that makes sense. thank you for the explanation 🤠
Describe the issue When publishing a payload via SNS (and probably SQS too) that is too large, the response should provide a better warning/message. Instead a TypeError is thrown because there is no Error message in the response
Steps to reproduce Steps to reproduce the behavior:
arc.events.publish(...)
)TypeError: @aws-lite/client: SNS.Publish: Cannot read properties of null (reading 'Error')
Expected behavior A clear message indicating why the message was unable to be processed (in our case, too big!)
Screenshots