Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Browsing all 2203 articles
Browse latest View live
↧

Lettuce 6.x throws commandTimeoutException

I used to connect to Redis using spring boot 2.0.5.RELEASE that has dependency for lettuce 5.0.5.RELEASE, and everything was working fine.I upgraded my spring boot to 2.4.13 that has dependency for...

View Article


Multiple keys pointing to a single value in Redis (Cache) with Java

I want to store multiple keys with a single value using jedis (Redis cache) with Java.I have three keys like user_1, driver_10, admin_5 and value = this is user, and I want to get value by using any...

View Article


How to delete list of keys async in Redis (springboot)?

I want to delete a huge list of keys in redis without blocking the redis in production and make it async in my Java springboot project. How to do it?

View Article

Redis Lettuce HSET / HGET results in CLUSTERDOWN Hash slot not served

Im working with Lettuce 6.1.8.RELEASE.Locally i have a Redis-Cluster with 3 Master / 3 Slaves.With Redis-CLI Keys / Hashes are set as usual.redis-cli -p 6379 cluster nodes127.0.0.1:6379@16379...

View Article

Jedis and Redis configuration with Springboot

After configuring the Jedis and Redis in a configuration package. I created jedisConnectionFactory and redisTemplate with the bean annotation. But application failed to run "Error: creating bean with...

View Article


Java Spring Boot Redis has occurred nested exception is...

My service is built with spring boot REST API with Redis.Some time face with error that logs:nested exception is java.util.concurrent.RejectedExecutionException: event executor...

View Article

How to make redis expire at an exact time in java?

example: I want make redis string "aKey":"aValue" expired at a future time(2018.08.17 00:00, now is 2018.08.16 12:00),this is my solution:long expireTime =...

View Article

Redis command timed out; nested exception is...

Today when I using Java redis client(spring-data-redis-2.3.9.RELEASE.jar) to consume Redis stream message encount this error:2021-05-11 17:49:42.134 ERROR 26301 --- [-post-service-1]...

View Article


Redis setting TTL to -1 in Java

redisSyncCommand.hmset(key, value);redisSyncCommand.expire(key, ttl);Have one method where we put (hmset) in cache with TTL in the above way.Due to some exceptions while hmset -ing... for the...

View Article


Redis Cache invalidation Strategies in Java Spring

I'm adding Redis to our Spring project and want to determine a suitable caching strategy. I am considering caching the result at the Controller's endpoint/method level for GET requests and invalidating...

View Article

JedisPool vs JedisPooled

Looking at the Jedis Getting Started, I understand it's better to use connection pools to be threadsafe. To do so, I would need a JedisPool and a try-with-resources statement like so:try (Jedis jedis =...

View Article

Setting key specific TTL with @TimeToLive for Redis Spring Caching triggers...

I have use case where single entries need to removed from the cache at a specific time. The TTL needs to be set on a key and not on a cache levelFollowing this spring redis documentation I tried to...

View Article

Can we use Spring data redis - partialUpdate in Production env?

I have been using partialUpdate, redisKVTemplate.update(entity) and it works well at our development environment, but when run this code in Production environment then Redis server CPU usage is high...

View Article


how to make the redis batch key query more stable

I am having a batch query in redis 6.x, this is the java code looks like:private List<Object> fetchBatch(List<Long> ids){ Set keySet = new HashSet(); ids.forEach(id ->{ String cachedKey...

View Article

Exposing Redis Service on EKS Cluster

I am running Redis Cluster on EKS as a statefulset and the service is headless. Everything is working properly but the backend application has a test which need to access the host url during the build...

View Article


Implementing Shedlock in Spring Boot using Redis Cache (Jedis resource Pool)

I am trying to implement shedlock in a Java Psring Boot application using redis. In every resource I search for it is mentioned that shedlock is compatible with Redis, However couldn't find how to...

View Article

What is the difference between RedisCacheWriter and RedisTemplate

JedisConnectionFactory jedisConnectionFactory() { RedisStandaloneConfiguration redisStandaloneConfiguration = new RedisStandaloneConfiguration("localhost", 6379); return new...

View Article


How can I make redis HMSET with EXPIRE atomic with Java?

For caching a map I want to set TTL,for now, I am doing like thistry { redisSyncCommand.hmset(key, map); redisSyncCommand.expire(key, TTL);} catch(Exception ex) { redisSyncCommand.expire(key,...

View Article

Two levels of cache (Redis + Caffeine)

When profiling an application it came up that Redis is impacting the execution times because there are many sleeps in threads. I need to implement two levels of cache or think about solution of this...

View Article

Filter out failing nodes on lettuce redis client

Is it possible to filter our failed nodes with lettuce?We're using a lettuce redis client (v6.1.5) via spring-boot-starter and every time there is a redis node restart we start having warning...

View Article
Browsing all 2203 articles
Browse latest View live


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