RedisTemplate save multiple key value pairs to hash problem
I've started using RedisTemplate in a spring app. opsForHash() has a 'put' method, but it only takes three parameters. I want to save a number of key-value pairs. This is very simple to do in node,...
View ArticleElatsic cache - redis - Not able to connect after writing ~30-40 K keys-...
I am using Elastic cache redis with 4 shards and 2 replica nodes for each shard, in total 12 nodes. I am using spring data redis with lettuce. Below is my configuration for cluster connection -public...
View ArticleHow to insert to redis with combined id from 2 fields in spring data?
I have an entity as Student and it has 3 fields: name, surname, score. I want to store them into redis, but my key must be name and surname together and score will be the value.I tried to do something...
View ArticleIs there a redis library which handles the pipelining automatically?
I am looking at the possibility of triggering the redis command from the client as a normal api and the library can pipeline the commands into it and possibly reply asynchronously back. Any library for...
View ArticleHow can I preserve type info when using RedisTemplate to store data?
I'm using RedisTemplate to store Long value, I store it successfully, I expect that I can get that Long value back, but the type of that value is not Long, but Integer.RedisTemplate<String,...
View ArticleHealth Check Redis Server
I have tried doing the health check of Redis Server using the below code:Jedis jedis = null; try { jedis = new Jedis(System.getenv(REDIS_END_POINT), Integer.parseInt(System.getenv(REDIS_PORT)),true);...
View ArticleCan't connect to redis from spring inside docker container
I am experimenting with containerization and trying to run an executable jar inside a docker container that writes to redis.I have already tried every suggestion on StackOverflow that I could find,...
View ArticleJava: Can I use Redis db to create Priority queues and the priority is set...
I am new to Redis. I want to use priority queues in Redis via Java client. I will have a set of key value pairs. And use this as a priority queue.The data set contains keys and its corresponding...
View ArticleRedis - Expired Indexes are not deleted
I found the following question (Spring Redis - Indexes not deleted after main entry expires) about a problem with expiration of indexes in Redis.The problem is that the main and :phantom entries expire...
View ArticleSpring Data Redis Expire Key
I have a One Spring Hibernate Application. In my application, Recently i am implemented Spring data Redis.spring-servlet.xml <!-- redis connection factory --> <bean id="jedisConnFactory"...
View ArticleSpring Using Redis @Cacheable
Can any one suggest a Redis (NoSQL DB) example for a Collection type? Generally we use the following (in Spring): @Cacheable(value = "PRODUCT", key = "#productId" ) public Map<String,Object>...
View ArticleIs Redisson getLock() Safe for Distributed Lock Usage?
Is Redisson's getLock() method good for a distributed use case, and how does it compare to getRedLock()?Redisson (3.11.x) has several methods to instantiate...
View ArticleWhat is the most scalable/secure way to handle refresh tokens in a JWT...
I am building my own authentication microservice and although I have the main setup in place (generating access tokens etc.), I am a bit lost when it comes to refresh tokens.I feel there are a lot of...
View ArticleObject can not be serialized
I have been getting "CarVO object doesn't implment serializable or Externalizable exceptions". Though my CarVO object implements Serializable and has serialVersionUid in it and it has only One member...
View Articleusing jedis hmset method for inserting multiple field element in redis
I am implementing a simple redis command using jedis in java. The redis-cli command is:hmset myhash key "value1" field2 "value2" field3 "value3"The problem is that jedis's hmset method requires two...
View ArticleHow to check cache keys gets created in Redis
I have written a code that uses Redis to store a key. Used CacheManage for that purpose. To test it, I have added one unit test cases. Code has been written in Java and a Docker instance is running in...
View ArticleMemory leak warning in spring boot
_ o.a.c.loader.WebappClassLoaderBase.log - The web application [ROOT] appears to have started a thread named [lettuce-eventExecutorLoop-1-1] but has failed to stop it. This is very likely to create a...
View ArticleRedisTemplate getExpire() return unexpect value in Springcache
I wanne refresh cache while near expiry. So I override part of springcache, and manage cache in my own redisCacheManager.Everything works fine, but when running the "get" method, unexpected values...
View Articleconvert redis subscribe message to model object for post call
I am subscribing to redis topic. I am reading the model message which is in org.springframework.data.redis.connection.Message format. I am able to convert to message to string.Employee [userName=efgh,...
View ArticleSpring boot Redis: move element at first in one sentense on zset
I'm using redis under spring boot.This is my related code:this.listOps.remove(key, value); this.listOps.add(key, value, System.currentTimeMillis()); I'm trying to remove and element and add it on the...
View Article