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

Why is the Redis key automatically deleted?

I am using the CrudRepository interface from Spring Data Redis module to access data in Redis.My Redis connection configuration is as follows:Here is my code: redis: database: 1 host: my.redis.com...

View Article


Redis two operations performing in single command like String command and...

I have a query regarding redis two operations performing in single command like String command and Hash command at a timefor fetching their values from Redis Server.SET key1 value1SET key2 value2HSET...

View Article


Getting RedisConnectionFailureException intermittently

StacktraceError reading data from redis for key: key_name. Error: org.springframework.data.redis.RedisConnectionFailureException: java.net.SocketTimeoutException: Read timed out; nested exception is...

View Article

How to pass variable to lua script from java? ( io.lettuce.core )

I have a lua script like this that does an hgetall command on a remote redis cluster:String shaFindAccount = syncCommands.scriptLoad("local hgetAllKeys = function(key) \n"+"local acc =...

View Article

How can I pass a variable to a Lua script from Java? (io.lettuce.core)?

I have a Lua script like this that does an hgetall command on a remote Redis cluster:String shaFindAccount = syncCommands.scriptLoad("local hgetAllKeys = function(key) \n" +"local acc =...

View Article


quarkus.cache.redis.value-type to protobuf values

In quarkus, I want to use the redis-based cache. The results are protobuf objects, which can be serialized to byte[] or ByteString.I understand that the value type must be serializable, so I tried to...

View Article

Does replacing a hash field in Redis through HSET command increase memory usage?

I am inserting JSON strings into Redis 7.2.4 from a Beam batch job running on Flink. I am using the Java SDK, using Redisson client of version 3.27.1. Redis is deployed in Sentinel mode.Every night, a...

View Article

How to update session automatically using spring boot and redis?

I am using Spring boot and redis for user session management. When the user logs in, the session dies after a certain period of time.I want the session duration to be updated as long as the user...

View Article


Get large data from redis is slow

I'm kind of a newb with Redis, so I apologize if this is a stupid question.I'm using Java to save data to redis.When I save small data ,everything is going well.But,when save and get a Map(the map have...

View Article


Spring Data Redis: Failed to convert from type...

I've been struggling with this exception from Spring Redis Streams when I try to convert a message from the Stream to my entity. I believe it is occurring due to an issue with the Redis Stream's...

View Article

GenericJackson2JsonRedisSerializer cache HashMap as HashMap

I have a simple springboot application with redisTemplate.My redisTemplate configuration is `ObjectMapper objectMapper = new ObjectMapper(); objectMapper.enable(JsonGenerator.Feature.IGNORE_UNKNOWN);...

View Article

Integrating Redis for Session Management in Spring MVC Application

I have a Spring MVC application currently deployed on Tomcat 9, and I'm looking to enhance its session management by integrating Redis. The application currently uses Spring Session with Tomcat's...

View Article

Query regarding @Cacheable in Spring Boot

I have a Student entity and I am having three different ways to retrieve a Student record using the student_id, student_phone and student_email. The student controller and data retrieval methods are as...

View Article


What are the notify-keyspace-events in Redis

I started to setup spring project by following this spring-boot article. But suddenly application could not start successfully, instead I am getting the following stack trace:Exception in thread "main"...

View Article

RedisConnectionFailureException intermittently

We observed RedisConnectionFailureException intermittently as mentioned in above stacktrace, quantum is around 2-3 per 15 mins, which is very low, but still it should not come ideally. As you can see...

View Article


how to avoid while loop while waiting for future complete?

I have a problem with a java future and an handler function. code example:public HealthCheckResponse call() { String redisHost = this.configuration.getRedisHost(); log.info("connect to redis host: {}",...

View Article

JEDIS/REDIS 'ON' Keyword or broken query?

Very new to REDIS, and having issues using JSON/Index/Query that is driving me crazy.Example structpublic class MyType implements Serializable {{ @SerializedName("myval") @Expose private Integer myval;...

View Article


Cannot serialize (Spring Boot)

I was developing a simple application to learn redis caching. Until I add redis as a caching mechanism on spring boot project the API's works fine. REST project you can say. Using Postman for calling...

View Article

How to get the session ID returned by cookie with spring-session-data-redis

When managing sessions using spring-session-data-redis, I think the session ID is returned in a cookie named SESSION.(FYI:https://spring.pleiades.io/spring-session/reference/guides/boot-redis.html)I...

View Article

Redis keys set via SpringBoot App not available via redis-cli and viceversa

I am making a redis connection on spring boot application by following properties.spring: redis: host: localhost port: 6379I have installed redis on windows via wsl and working fine on the same portBut...

View Article
Browsing all 2203 articles
Browse latest View live


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