Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
0 answers
34 views

Right redis cluster caching mechanism with spring boot microservices

I'm working with Spring Boot Microservice project. For now i have used redis per microservice. I want to use redis cluster and have one microservice for caching data throw messaging system. I want to ...
Jeff's user avatar
  • 11
0 votes
0 answers
57 views

How to get access to field of nested reference in Redis Document from autogenerate metamodel

I am using redis-om-spring:1.0.4 with spring boot 3.4.10 for getting @Document support. I have some class like @Setter @Getter class Vehicle { @Id private String id; ...
Stanislav's user avatar
  • 451
1 vote
1 answer
75 views

Spring Boot 3 with Lettuce: How to avoid SENTINEL REPLICAS command when user lacks permissions?

I am setting up a Spring Boot 3 application (using Gradle and Java 17) with Redis Sentinel and the Lettuce client (non-reactive, with RedisTemplate). Our infrastructure team has provided a Redis ...
user31695579's user avatar
1 vote
1 answer
30 views

Spring - Cache - Concurency issue

I have this cache @Cachable(cacheName = CACHE_MY_CACHE, key="#param", sync=true) public Object doStuff(String param){ ... } Which is using Redis in the background so it's distributed ...
David S's user avatar
  • 307
1 vote
0 answers
67 views

Why does findByTypeNotIn in Redis OM Spring generate the same RediSearch query as findByTypeIn?

I’m using Redis OM Spring with a simple repository: @Document(value = "Marker", indexName = "MarkerIdx") data class RedisMarker( //other indexed @Indexed ...
Pawandeep Singh's user avatar
0 votes
1 answer
75 views

OAuth2Authentication token serializing by spring session with redis

I am using spring session for redis for my oauth2 login. I have implemented a custom principal. @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public final class ...
Allen Bastian's user avatar
-4 votes
1 answer
65 views

Change default configuration properties for spring-boot-starter-data-redis

I want to use spring-boot-starter-data-redis with custom configuration properties: redis: host: localhost port: 6379 password: pass timeout: 5000 It's working only when I use: spring: ...
Peter Penzov's user avatar
  • 1,260
0 votes
1 answer
93 views

Spring Data Redis Repository Function delete...By not working?

I am using spring-data-redis (version 3.5.0-M2). This is my entity class: @RedisHash("Embedding") @Data @NoArgsConstructor @AllArgsConstructor public class Embedding { @Id private ...
Akshit Bansal's user avatar
0 votes
0 answers
65 views

How to handle when redis keyspace notification is delayed when using Spring session with it?

In my application im using spring session with redis as the data store. We track if a user is logged in/not based on the Session Destroyed event. Whenever we receive this event we will mark that ...
Supes's user avatar
  • 1
1 vote
0 answers
123 views

How to use RedisTemplate.execute(SessionCallback) without type issues?

Here's my basic example setup: private final RedisTemplate<String, Object> redisTemplate; public void save(Object thing, Instant expiresAt) { redisTemplate.execute(new SessionCallback<...
OrangeDog's user avatar
  • 39.2k
1 vote
1 answer
526 views

Lettuce Redis: Does Command Timeout Include Connection Pool Wait Time?

I'm using LettuceConnection with a connection pool to connect my application to a Redis server. However, during load testing, I encountered a significant number of command timeout errors. Initially, I ...
Thanyares Permpongpaiboon's user avatar
0 votes
0 answers
39 views

Shared properties for Spring Cloud Config Server with Redis Backend

Having Spring Cloud Config Server v4.2.1 with Redis Backend I'm trying to configure common (shared) properties which should be available for all client application. There is an approach clearly ...
Dmytro Bilorus's user avatar
2 votes
2 answers
118 views

Does Redis save long as Int?

I've got this exception. java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.Long (java.lang.Integer and java.lang.Long are in module java.base of loader 'bootstrap'...
박수민's user avatar
0 votes
1 answer
25 views

Spring Declarative Annotation-based Caching compatibity with Redis Template Implementation

When I am inserting object to redis, I am using spring annotation and when I try to get the object I am using redis template implementation. While doing so, I am getting exception. Below is the spring ...
Happs's user avatar
  • 125
0 votes
0 answers
32 views

Migrate spring-data-redis 1.5.2.RELEASE to 2.3.12.RELEASE

I'm trying to migrate spring-data-redis 1.5.2.RELEASE to 2.3.12.RELEASE, but I'm finding that some methods in RedisCacheConfiguration are not in version 2.3.12.RELEASE I have the method ...
mf117's user avatar
  • 11
0 votes
2 answers
120 views

unable to cast body as String from ResponseEntity

In my Spring Boot environment I was testing some API. From Service I am returning ResponseEntity. However when I try to collect its body in controller class, I am getting exception. Service class ...
JPG's user avatar
  • 1,263
0 votes
1 answer
133 views

spring-data-redis with Microsoft Entra ID authentication

Couldn't find any way how to integrate spring-data-redis with Microsoft Entra ID authentication. Seems RedisTemplate can work only with RedisConnectionFactory which doesn't support connection through ...
Gekster's user avatar
  • 111
1 vote
0 answers
47 views

Expiry events with Redis cluster

`I want to activate Redis expiry events with Redis cluster having 3 nodes using spring-boot apllication Added all configurations CONFIG SET notify-keyspace-events Ex to verify CONFIG GET notify-...
Lucifer's user avatar
  • 11
1 vote
1 answer
223 views

Getting "class java.lang.String cannot be cast to class java.time.LocalDate" when reading from Redis cache

I'm using Spring Boot with Redis caching and Jackson2JsonRedisSerializer for serialization. My RedisConfig is set up like this: @Configuration @EnableCaching public class RedisConfig { @Bean ...
Requiet's user avatar
  • 85
-1 votes
1 answer
128 views

Redis spring - JSON:Cannot construct instance of

I have the following class @NoArgsConstructor @Data public class MainList implements Serializable { private static final long serialVersionUID = 5679734271483606796L; @Id private String ...
user1555190's user avatar
  • 3,403
1 vote
1 answer
318 views

How can I use @ServiceConnection with Redis Testcontainers for Spring Session Redis?

My application involves using Spring Session Redis to handle authenticated sessions across the application. Spring Session Redis is configured as-per the docs. @Configuration @EnableRedisHttpSession ...
nednella's user avatar
0 votes
0 answers
45 views

Why does Redis existsById method sometimes return false under high load or concurrent access even though the key exists?

I’m facing an issue with Redis when checking if a key exists using CrudRepository.existsById(). Under normal conditions, everything works fine, and the key exists in Redis, but the problem arises ...
Lakshitha Samod's user avatar
0 votes
0 answers
187 views

How to Override Spring's Default ReactiveRedisTemplate with Custom AutoConfiguration Without Bean Override Exception?

I am trying to create a custom ReactiveRedisTemplate in my Spring Boot application with a specific configuration for String keys and Object values. My goal is to override the default ...
2shar's user avatar
  • 121
0 votes
0 answers
267 views

In Spring Data Redis, how can I create a listener of key expiration events for all topologies of Redis, from standalone to cluster to sentinel?

I've got a Spring Boot 3.3.x app, and we're using Redis with Lettuce, so I'm getting all the Spring Data Redis goodies via the Redis starter. Note that we are not using the entity or repository ...
Matthew Adams's user avatar
0 votes
0 answers
37 views

Project with custom Redis and Spring Boot

I want to make a web app for managing a custom redis implementation I will make using CodeCrafters build your own redis. I want to build the backend of this app using Spring boot. I expect this won't ...
Binary's user avatar
  • 67
0 votes
1 answer
433 views

Redis and time series with spring boot and lettuce

I want to store time series data daily in Redis (or try it out at least) I have a set up with lettuce and its working fine with the RedisTemplate. But I'm not sure where to begin with time series data ...
user1555190's user avatar
  • 3,403
-1 votes
1 answer
47 views

Redis querying to get values using a wild cards

So im using redis template with spring and saving some data in redis like so: this.redisTemplate.opsForValue().set("cars:toyota:corolla", car, Duration.ofSeconds(48*60*60); ...
user1555190's user avatar
  • 3,403
1 vote
0 answers
54 views

Redis key disappeared from Redis cluster cause distributed locking failure

I've implemented custom locking service with Kotlin and Spring Boot Webflux to prevent transaction of same user is processed at the same time. the second transaction should loop until the first one is ...
DDDDDD's user avatar
  • 11
1 vote
4 answers
146 views

Any alternate search option other that SCAN when search is based on key pattern

I am using redis as database. Here is the example of key and value I am using. Both key and value are of type string. Key - shipping_rate:64:MNR:Home-Delivery. It is combination of 3 fields like ...
achowdhury's user avatar
0 votes
0 answers
129 views

Issues with Redis Embedded Temporary Files Accumulation in Windows using java quarkus

I am using Redis Embedded in my Java Quakrus tests with the following dependency: <dependency> <groupId>it.ozimov</groupId> <artifactId>embedded-redis</artifactId> <...
Dev-tools's user avatar
0 votes
1 answer
1k views

Redis pub sub performance impact and limitations when using single channel with thousands of consumers

In our Spring boot apps, we want to use Redis pub-sub to publish messages to a channel that in normal conditions has around 500 listeners. But on certain rare times/days, the listeners can be as large ...
RaRa's user avatar
  • 306
-2 votes
1 answer
141 views

Cannot create transaction in spring-data-redis (No ongoing transaction. Did you forget to call multi?)

I have redisTemplate that is initialized with connectionFactory and has enabled transaction support. The problem is that redisTemplate.multi(); doesn't seem to create transaction. redisTemplate.multi(...
idix's user avatar
  • 53
0 votes
1 answer
242 views

Enable local cache of spring session which is persisted in redis

I am working on a spring web application where I am implementing the SSO using spring security and I am using the redis as the database to persist the session data. I got this part working, however, ...
coder's user avatar
  • 408
1 vote
0 answers
47 views

Why is the object passed to the SimpleKeyValueRepository.delete(T obj) method ignored, and the HGETALL method is executed to retrieve the same object?

I am curious as to why Spring Data Redis does not provide support for custom deleteBy methods? For this reason, we have to use a workaround to perform these methods: a service method that calls the ...
Skrynfor's user avatar
1 vote
1 answer
215 views

Spring Session / Security - Redis Sessions not being properly deleted

I have a Spring OAuth Client (BFF), between a Public Angular Client, and an Auth0 Authorization server. When I login, the BFF correctly persists the session to Redis (and with it, the Authorized ...
Sachin's user avatar
  • 569
0 votes
1 answer
351 views

Redis ft.search lettuce return java object instead of Document<K, V>

Is is possible to return plan java object and not Document<K, V> using lettucemod with Redis Stack? The API seems to strange, as I understand this: StatefulRedisModulesConnection<K, V> ...
adamzrk's user avatar
0 votes
2 answers
189 views

Accessing in-transit encryption enabled Elasticache with Spring Redis, throws an error for the stringRedisTemplate.keys method

We have an in-transit encryption enabled AWS Elasticache instance. We're trying to access the instance from our Spring boot microservice with Spring data redis SSL enabled. LettuceClientConfiguration ...
Aki T's user avatar
  • 666
1 vote
1 answer
899 views

How to resolve CROSSSLOT key error on Redis Cluster using Spring Boot and RedisHash with Multiple Indexes

Im trying to solve the CROSSSLOT Keys in request don't hash to the same slot when using @RedisHash on an entity class having more then one @Indexed on varaiables. Is there any way to store the hashing ...
herman shafiq's user avatar
1 vote
0 answers
99 views

Spring Auth Server - Cannot Persist Session + CSRF cookies to Azure Redis

I've been building a Spring Auth Server the past month or so. It can create a Session ID and CSRF Token, so now I am starting to try and take everything out of in-memory to an external Redis Cache (...
Sachin's user avatar
  • 569
1 vote
1 answer
569 views

Atomic Redis transaction for idempotency required for database inserts using Redis Springboot 3

We are using springboot 3.2.5 and spring data jpa to insert data into RDBMS. Now there is a requirement to ensure duplicate data does not get inserted into RDBMS. So we have to first check if data ...
user2176576's user avatar
0 votes
1 answer
130 views

Redis OM Spring doesn't return FT.SEARCH results even it exists

I have a data model created with Redis-OM-Spring as follows: @Data @Document public class RedisOAuth2Authorization implements Serializable { @Indexed @NonNull @Id private String id; ...
Suvin Nimnaka Sukka's user avatar
0 votes
0 answers
272 views

How to obtain Lettuce Redis Client from Spring Boot?

I need to obtain a lettuce Redis client to perform xautoclaim. xautoclaim is not exposed in Spring Data Redis. I thought about obtaining client variable from LettuceConnectionFactory using reflection ...
pixel's user avatar
  • 26.8k
0 votes
2 answers
470 views

I want to know when spring-data-redis supports commands like hexpire

To use ttl for hashkey field, I want to use hexpire, the command applied to the latest redis, but I wonder if there is a reflection plan in spring-data-redis. I used redisson before, but I support ...
윤태성's user avatar
0 votes
0 answers
188 views

Spring Boot Redis Cache DefaultSeriaLizer Problem

I'm trying to implement Redis caching in my Spring Boot project to cache user profile information retrieved by the getProfileByUsername method in the UserService class. However, encountering a ...
Jabed Iqbal Joy's user avatar
1 vote
0 answers
636 views

Spring Reactive - Redis Health Check Failing

I have enabled my application to use the actuator/health endpoint and kept getting the status as 'DOWN'. After checking the full health endpoint details, I can see that I am getting two reponses for ...
amasuKAKAROT's user avatar
2 votes
1 answer
767 views

com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Missing type id while fetching data from redis cache

I have implemented a redis cache in a spring boot project. Below is the code used to cache the data returned by the method. when executed first time , it stores data into cache successfully. EDIT @...
Muddassir Rahman's user avatar
0 votes
1 answer
146 views

Spring rest repository jackson serializer problem

When I use Spring rest repository + spring security + spring session + redis,the type org.springframework.hateoas.Links cannot (de)serialization,the stacktrace as follows 2024-06-27T10:11:45.816+08:00 ...
douzengrui's user avatar
0 votes
1 answer
291 views

When I use CompositeCodec(StringCodec.INSTANCE,new TypedJsonJacksonCodec(Member.class))how can RMap get value be correctly converted to a Java object?

Line 55 expects map.get(name) to return a value of type Member instead of LinkedHashMap, When using CompositeCodec Specify mapValueCodec as TypedJsonJacksonCodec. The getMemberByName method will throw ...
xuleilei's user avatar
0 votes
3 answers
939 views

Unable to connect to Redis | Spring Boot

I've a redis service on upstash.io but not able to connect to it from my spring boot application This is my redis config @Configuration public class RedisConfig { @Bean public ...
Dhananjai Saini's user avatar
0 votes
0 answers
49 views

In redis, how to quickly get names based on a list of keys

I want to implement a tag cloud. Tag information is stored in Redis: redisTemplate.opsForValue().set(tagKey, tagName); The usage count of the tags is also stored in Redis, using a sorted set: ...
Ted Han Neversummer's user avatar

1
2 3 4 5
22