You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is my code :
`
String key = REDISSON_RATE_LIMIT + limit.prefix() + ":" +spel;
RRateLimiter rRateLimiter = redissonClient.getRateLimiter(key);
rRateLimiter.trySetRate(RateType.OVERALL, limit.rate(), limit.rateInterval(), limit.unit());
if (limit.expireSecond() !=-1) {
rRateLimiter.expire(limit.expireSecond(), TimeUnit.SECONDS);
}
@RedissonRateLimit(prefix = "trade", spel = "#trade.rootMchId",
rate = 1, rateInterval = 2, unit = RateIntervalUnit.SECONDS, expireSecond = 5)
@PostMapping("/trade")
public ResponseEntity trade(@requestbody Trade trade) {
return ResponseEntity.ok("success");
}
`
then I fund a bug :
5 seconds have passed, the redis key “redisson_rate_limit:trade:rootMchId0001” has removed,but the redis key
"{redisson_rate_limit:trade:rootMchId0001}:permits" and “{redisson_rate_limit:trade:rootMchId0001}:value ” still exist.
Who knows you can help me?please...
The text was updated successfully, but these errors were encountered:
this is my code :
`
String key = REDISSON_RATE_LIMIT + limit.prefix() + ":" +spel;
RRateLimiter rRateLimiter = redissonClient.getRateLimiter(key);
rRateLimiter.trySetRate(RateType.OVERALL, limit.rate(), limit.rateInterval(), limit.unit());
@RedissonRateLimit(prefix = "trade", spel = "#trade.rootMchId",
rate = 1, rateInterval = 2, unit = RateIntervalUnit.SECONDS, expireSecond = 5)
@PostMapping("/trade")
public ResponseEntity trade(@requestbody Trade trade) {
return ResponseEntity.ok("success");
}
`
then I fund a bug :
5 seconds have passed, the redis key “redisson_rate_limit:trade:rootMchId0001” has removed,but the redis key
"{redisson_rate_limit:trade:rootMchId0001}:permits" and “{redisson_rate_limit:trade:rootMchId0001}:value ” still exist.
Who knows you can help me?please...
The text was updated successfully, but these errors were encountered: