I think `check` and `isThrottled` can be the same method. You increment and return the current "rate", and then make your judgement to proceed based on the rate that was returned.

So if we just have a function `incr`, then return the count, the consumer is probably fine to handle the `if (count > max)` part.