Bucket4j with Apache Ignite #237
Unanswered
KumariPrasanna
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hello @KumariPrasanna
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Vladimir,
I am trying to use bucket4j with Apache Ignite. My requirement is to have a separate bucket for each client. Therefore, depending on the client, I need to retrieve the appropriate bucket to check for available tokens.
Here is the code which I have tried so far for getting the bucket. However, I am unclear on how to fetch client specific bucket.
}
Let's say, first time I intercept a request based on which I create a client specific bucket. For example, if the client is "client1", I will create a "client1" bucket as described above ( similarly I will create "client2" bucket for "client2"). Where and how can I store this bucket so that I can retrieve the client specific bucket the next time when a request that needs to be rate-limited for this client is intercepted? Should I simply invoke " igniteProxyManager.builder().build("client1", bucketConfiguration);" to get the client specific bucket? Will this create a new bucket again or return an existing client bucket that was created the very first time.
Thanks,
Prasanna
Beta Was this translation helpful? Give feedback.
All reactions