Spring Boot
MySQL
Redis
Redisson Client
Redisson Distributed Lock
Docker
Docker-Compose
Lombok
Spring Retry
CommandLineRunner
We can easily run the whole with only a single command:
docker-compose up -d
./redis-publisher
mvn spring-boot:run
./redis-subscriber-one
mvn spring-boot:run
./redis-subscriber-two
mvn spring-boot:run
RLock lock = redisson.getLock("update-stock-lock");
lock.lock(4, TimeUnit.SECONDS);
lock.unlock();
@Retryable(value = org.redisson.client.RedisTimeoutException.class, maxAttempts = 2, backoff = @Backoff(delay = 2000))
- System Design