How can we use bucket4j spring boot starter with spring cloud gateway?

389 views Asked by At

I've to rate limit users based on their plans and endpoints. Unfortuntely, there is no built in solutions in spring cloud gateway with lettuce redis client. I came across bucket4j-spring boot starter. But I couldn't find examples about it. I need to customize with java. But their docs provide examples in which configurations are made through yml files. I want flexible solution so that if user upgrade plan then his rate limiting also adjusted accordingly. Bucket4j provides solution to replace configuration but how can i do that? Should i use bucket4j spring boot starter or customize bucket4j myself.

I tried to configure redisRateLimiter of spring cloud gateway. but couldn't get results. I need to use lettuce redis client.

0

There are 0 answers