Q: can we expose how much a rate limit has been exceeded? #408
Unanswered
travispeloton
asked this question in
Q&A
Replies: 1 comment 2 replies
-
You can attach listener to the bucket and catch event each time when request to acquire tokens is being rejected https://bucket4j.com/8.4.0/toc.html#listening-for-bucket-events |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I'm using
ConsumptionProbe.remainingTokens
to calculate when I'm within X percent of hitting the limit, so that is helping me monitor my rate limits.For rate limits that I am exceeding, it would help me if I could see "by how much have we exceeded the limit?"
Can anyone suggest a way to expose this? Originally I thought that
remainingTokens
would turn negative, but it is locked to go not lower than0
in the codeBeta Was this translation helpful? Give feedback.
All reactions