= Distributed Rate limiting for Apache James on top of Redis

This package provides distributed rate limiting using Redis as a shared data store.

It reuses work of xref:../rate-limiter/README.adoc[the Rate Limiter extensions] but substitute a Redis implementation
for the underlying rate limiting.

== Running rate limiting with the memory implementation

- 1. Compile this project.
- 2. Place the generated "jar with dependencies" in James `extensions-jars` folder.
- 3. Configure James to use the redis implementation for Rate Limiting by putting the following content within
`extension.properties`:

----
guice.extension.module=org.apache.james.rate.limiter.redis.RedisRateLimiterModule
----

- 4. Provide a `redis.properties` file:

----
redisURL=redis://redis:6379
redis.topology=standalone
----

- 5. Use the rate limiting mailets within `mailetcontainer.xml`

We provide a sample `docker-compose` demonstrating this setup.