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

How to create Empty redis stream?

Is possible to create empty stream using spring redis data?Am trying to create rest endpoint to create just stream without data.Thanks,

View Article


Spring Redis - Read configuration from application.properties file

I have Spring Redis working using spring-data-redis with all default configuration likes localhost default port and so on.Now I am trying to make the same configuration by configuring it in...

View Article


Redis Lettuce - get object data

I had used following tutorial to integrate Redis using Lettuce connection in my springboot application.https://blog.tericcabrel.com/data-caching-spring-boot-redis/The good thing about the above...

View Article

How do I get all the keys from a redis cache via Spring Boot with Spring Data...

I am trying to get the entries in a Spring Boot Cache backed by Redis How do I get all the keys from a redis cache via Spring Boot? uses 1.x of Spring-Data-Redis and the current version uses...

View Article

Ensure 1 session per user for multiple instance BE in Springboot using Redis

I have spring boot application that runs in 4 instances. I used 1 Redis as centralized session management. Currently, the session was successfully stored in Redis. In my custom...

View Article


How to dynamically change TTL at runtime in Java Redis cache?

I'm working on a Java application that uses TTL to control the lifespan of data stored in a Redis cache. Currently, the TTL is set to a fixed value in the application configuration. However, I need to...

View Article

Unexpected error occurred in scheduled task, None of slaves were synced -...

Applying locks on kafka events using redis so that same kafka event will not process by multiple pods.java.lang.IllegalStateException: None of slaves were synced...

View Article

Image may be NSFW.
Clik here to view.

Quarkus redis client throwing error...

We're trying to move from standalone redis to redis High availability mode. However while load testing in dev environment we're receiving below error. level=ERROR time="07-03-2023 20:54:35"...

View Article


@TestConfiguration for Embedded Redis, same Redis Server for all Test classes

I use a Embedded Redis for integration testing. I set up my tests with Redis according to following article: https://www.baeldung.com/spring-embedded-redis.The problem is, if I want to use the...

View Article


How to test exceptionally here and how to improve this code?

I am new to CompletableFuture and Redis. I am using Lettuce Client to connect to Redis (in Java). I want some guidance on how to test the if exception is thrown correctly.private final...

View Article

How to dynamically change TTL at runtime in Java Redis cache?

I'm working on a Java application that uses TTL to control the lifespan of data stored in a Redis cache. Currently, the TTL is set to a fixed value in the application configuration. However, I need to...

View Article

How to test exceptionally for CompletableFuture? [closed]

I am new to CompletableFuture and Redis. I am using Lettuce Client to connect to Redis (in Java). I want some guidance on how to test the if exception is thrown correctly.private final...

View Article

Spring boot - Writing 35K/sec messages to Redis

I need to write 35,000-per-second messages to Redis.The average message size is 250 bytes.My app is a spring boot application hosted in Azure AKS.The Redis is an Azure Redis (premium, 30000 concurrent...

View Article


Set created and updated date in a Redis key-value pair with Spring Boot

I am trying to set the creation timestamp and the updation timestamp in a Redis item just like we have in Hibernate and Spring Data JPA but it is just setting those fields to null.@CreatedDateprivate...

View Article

Spring redis configuration in cluster mode

I have this redis configuration class which sets the transaction support to True. The redis is in a clustered mode. When the application calls this haskey method, the application returns the following...

View Article


Is there anyway to refresh the caffeine cache on certain interval wihtout...

I have the code like thiscache = Caffeine.newBuilder() .build(this::loadData)string loadData(String key) { return redishelpr.get(key);}What I want is run this loadData(key) function after every 15...

View Article

ERR This instance has cluster support disabled

I am trying to connect to cluster Redis with a valid URL and port I got this error:Caused by: io.lettuce.core.RedisCommandExecutionException: ERR This instance has cluster support disabled at...

View Article


Update viewCount on every hit in redis

I'm using Redis to cache an object. I want to maintain a count of hits on redis for a particular key. For example,This is the key value pair I'm storing key value as below in Redis.<customerId,...

View Article

jackson convert a map to list of object

I have the below Sinister entity@Document@Getter@Setter@ToString@AllArgsConstructor@NoArgsConstructor@Builder(toBuilder = true)@JsonInclude(JsonInclude.Include.NON_EMPTY)public class Sinister {...

View Article

How to save message coming from RabbitMQ into Redis Cache/DB?

I have one listener service in my microservice and two scheduler service. In the listener service after receiving the message save the last updated date time and scheduler name in  Redis DB.Can anyone...

View Article
Browsing all 2204 articles
Browse latest View live


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