I'm facing an issue with the Redis connection pool, reaching the max wait queue size, at moments with more reads. There are some reads in a loop that would be good to batch in one request to Redis. But I cannot find a way to use Redis pipelines with Quarkus Redis Client. Is there a way to do it?
Here is my Redis service:
public class CacheService { private final HashCommands<String, String, CachedData> redisHash; protected CacheService(RedisDataSource redis) { this.redisHash = redis.hash(CachedData.class); } protected CachedData get(String name) { return redisHash.hget("data", name); }}
And here are the multiple reads in a loop that can be done with pipelines:
names.stream().map(cacheService::get).toList();
How I can use Redis pipelines with Quarkus?