Questions tagged [spring-data-redis]

Spring Data Redis, part of the larger Spring Data family, provides easy configuration and access to Redis from Spring applications. It offers both low-level and high-level abstractions for interacting with the store, freeing the user from infrastructural concerns.

Spring Data Redis, part of the larger Spring Data family, provides easy configuration and access to Redis from Spring applications. It offers both low-level and high-level abstractions for interacting with the store, freeing the user from infrastructural concerns.

Features

  • Abstraction across multiple Redis drivers/connectors such as Lettuce and Jedis.
  • JDK, String, JSON and Spring Object/XML mapping serializers.
  • Spring cache abstraction for use with Redis.
  • JDK Collection implementation on top of Redis.
  • Pub/Sub integration.
  • Reactive and imperative APIs.

Online Resources:

Version History

1029 questions
0
votes
1 answer

Why doesn't Redis call my MessageListener on __keyevent@*__:expired topic events?

I have recently upgraded Spring-Boot to 2.1.4.RELEASE and Spring-Cloud to Greenwich.SR1. My service is running on Java 11. My only dependency to Redis is through spring-boot-starter-data-redis. Although I did the configuration on Redis by setting…
0
votes
1 answer

Spring Data Redis: Redis Pipeline hget returning always null

getRedisTemplate().executePipelined( new RedisCallback() { @Override public Object doInRedis(RedisConnection connection) throws DataAccessException { connection.hGet(key); return null; } …
nntk
  • 7
  • 2
0
votes
1 answer

Redis sets the object as empty json "{}" while using Spring Boot

I'm trying to set an object on redis. RedisTemplate configuration is shown below. @Bean fun redisTemplate(): RedisTemplate { val redisTemplate = RedisTemplate() redisTemplate.connectionFactory =…
Mustafa Güven
  • 15,526
  • 11
  • 63
  • 83
0
votes
1 answer

Spring Integration Redis RPOPLPUSH

I am new to Spring Integration & Redis, So my apology if I am making a naive mistake. My requirement is as below - Need to implement a message queue. For dispatching money to the user based on some events. The queue should not be volatile and…
Krishnendu
  • 1,289
  • 18
  • 26
0
votes
0 answers

Could not store data in Redis data storage - Spring Boot

I have a problem with storing data into Redis storage. Redis is dockerized. I have to mention that connection to Redis is successfully opened and querying data works perfectly fine - there is no issues at all but when I'm trying to store data the…
Heril Muratovic
  • 1,940
  • 6
  • 25
  • 46
0
votes
2 answers

Redis caching Map

I an using redis cache and faced the problem: map with integer key is serialized as String like this: "1":"AAAA","2":"BBB","3":"CCC" This is how my config looks like: @Bean public RedisCacheConfiguration myCacheConfiguration() { …
Sviatlana
  • 1,728
  • 6
  • 27
  • 55
0
votes
0 answers

Getting Error creating bean with name 'requestMappingHandlerAdapter' exeception while adding Redis Dependency

In My spring boot application I am facing below problem. Added below dependency in build.gradle file compile('org.springframework.boot:spring-boot-starter-data-redis-reactive') Added in Application.java file @Bean public…
Rahul
  • 493
  • 3
  • 7
  • 25
0
votes
1 answer

use spring boot data redis Connect to the redis cluster problem

I used spring boot data redis to connect to the redis cluster, using version 2.1.3 The configuration is as follows: @Bean @Primary public RedisConnectionFactory myLettuceConnectionFactory(GenericObjectPoolConfig poolConfig) { …
hero-zh
  • 45
  • 7
0
votes
1 answer

Cannot pipeline EVALSHA commands in Spring Data Redis

I'm attempting to pipeline the EVALSHA command of Redis inside Spring Data Redis as described here. However when I attempt to do this using EVALSHA it throws an UnsupportedOperationException as found here in the Spring Data Redis code. Given that…
alex.p
  • 2,627
  • 17
  • 28
0
votes
1 answer

Data not persisting to mysql when called from MessageListener in springboot

I have a service which updates a cell in MySQL. The service works perfectly fine when called from a controller. But the same service fails to persist data when called from MessageListener. My listener looks something like below public class…
azhar
  • 167
  • 11
0
votes
1 answer

RedisMessageListenerContainer: SubscriptionTask aborted with exception: ClassCastException

I am using Lettuce 4.5.0 and Spring-data-redis 1.8.0. I am trying to use pub/sub with Redis 4.0 cluster using RedisMessageListenerContainer. But I am getting this error: RedisMessageListenerContainer: SubscriptionTask aborted with exception: …
Ritu S
  • 1
  • 1
0
votes
1 answer

Lettuce RedisCache throws java.util.concurrent.RejectedExecutionException Thread limit exceeded replacing blocked worker

I am using Spring Boot with Redis-Cache, with Lettuce default configuration, and receiving the following RejectedExecutionException after the server has been up for a few minutes: org.springframework.data.redis.RedisSystemException: Unknown redis…
apines
  • 1,254
  • 14
  • 36
0
votes
1 answer

Can i create a table like structure in redis like "ID , KEY , DATA , STATUS , EMAIL"

i'm very new to redis. we have a requirement where I need to create a table like structure in redis. ID | Name | Region | Time 01 | Aaa | s1 | ... 02 | Bbb | s2 | ... I need to add constraint for Primary Key(ID,Name,Region)
Adarsh r
  • 11
  • 2
0
votes
1 answer

How do I using RedisMessageListenerContainer in configuration class

I am using spring-MVC and spring-data-redis to control Redis-cluster pool. When I using jedisCluster.subscribe(new JedisPubSubListener(), "bb"); my application will stock in this code(I try to use thread but the other one can't get the instance in…
石荒人
  • 753
  • 1
  • 6
  • 11
0
votes
1 answer

Redis Connection times out when trying to persist a comparatively bigger entity

I use azure redis with Spring-data and normally the entities saved onto it are in the ranges of 200KB- 1MB per request, but now when the entity is ~6MB, I get the exception: org.springframework.data.redis.RedisConnectionFailureException:…
Manish Karki
  • 473
  • 2
  • 11