Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2203

Redis pipelining in Quarkus

$
0
0

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?


Viewing all articles
Browse latest Browse all 2203

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>