beam-community / bamboo

Testable, composable, and adapter based Elixir email library for devs that love piping.
https://hex.pm/packages/bamboo
MIT License
1.9k stars 343 forks source link

How to implement or configure a sending rate limit? #628

Open travelmassive opened 2 years ago

travelmassive commented 2 years ago

Hi folks - is there an easy way to implement a sending rate limit / rate throttle?

I am sending async with the AWS SES Adapter and I'm hitting SES' rate limit when sending out ~1000 notifications. Only 100 or so notifications are delivered. The rest are dropped.

I'm not sure what part of the pipeline I should expect to be responsible for this? eg. Bamboo? ex_aws? ex_aws_ses? Or my own code?

It looks like ex_aws provides a way to retry failed API calls, but this seems to be a general approach for all AWS API methods and not email specific (ie: it's not a robust strategy to throw all your email at AWS and re-attempt any errors).

Thanks for any tips / pointers.

-- Ian