Throttling Messages in Akka 2
Our goal is to implement a message throttler, a piece of code that ensures that messages are not sent out at too high a rate.
Let’s see a concrete example. Suppose you are writing an application that makes HTTP requests to an external web service and that this web service has a restriction in place: you may not make more than 10 requests in 1 minute. You will get blocked or need to pay if you don’t stay under this limit. With a throttler, you can ensure that the requests you make do not overstep the threshold rate.