linagora / james-project

Mirror of Apache James Project
Apache License 2.0
70 stars 63 forks source link

Add `redisTimeoutException` for RateLimiter mailets #5174

Closed vttranlina closed 2 months ago

vttranlina commented 2 months ago

Why?

The following mailets utilize Redis for rate-limiting computations: GlobalRateLimit, PerRecipientRateLimit, and PerSenderRateLimiter. Currently, the lecture library (utilized by the ratelimitj library) connects to Redis with a default timeout of 60 seconds. This default timeout is quite long for a mailet.

Ref: https://github.com/linagora/tmail-backend/issues/1013

How

The mailet supports configuration with the redisTimeoutException parameter, which defaults to None. Eg: <redisTimeoutException>5000</redisTimeoutException>

Dod

vttranlina commented 2 months ago

pr https://github.com/apache/james-project/pull/2227