How to avoid caching null values in redis cache
@CacheResult(cacheName = "testCache)public Employee geteEmployee(@CacheKey String empId) { //logic return employee;}If employee is null, that null value should not be cached.
View ArticleHow to manage multiple users from taking same action on a data record in a...
i'm stuck for a specific implmentation. We have a web application backed by spring framework which displays list of records to the users. We have a requirement where-in, when user open the record we...
View Articleredis-backed spring-session in wicket app, problem with ajax calls resulting...
I'm trying to modify a wicket application to store the session in redis via spring-session. The session is showing up in redis, but I've run into a problem that whenever the application makes a...
View Articleio.smallrye.mutiny.TimeoutException when using kafka vs redis
I'm using kafka vs redis in my project.i am using kafka, i get message from it process and save to redis, but it is giving error like below.this error message occurs when my code runs after some time...
View ArticleRedisTemplate + Lua script: command arguments must be strings or integers
I want to atomically insert or update a key, insert this key into an index and, optionally, increment a count. To this end, I wrote the following Lua script. In this script, KEYS[1] is the element key,...
View ArticleRedis cache implementation using Spring boot with hashing
I am trying to create and delete a cache using RedisCacheManager with spring-boot and want to use HSET programmatically but am unable to do it. I am able to do it as a simple SET but not as HSET.This...
View Articlecalling a Redis function(loaded Lua script) using Lettuce library
I am using Java, Spring-Boot, Redis 7.0.4, and lettuce 6.2.0.RELEASE.I wrote a Lua script as below:#!luaname = updateRegisterUserJobAndForwardMsgfunction updateRegisterUserJobAndForwardMsg (KEYS, ARGV)...
View ArticleHow can i run Redis raw commands in Java Lettuce?
I am building a Java application using lettuce as a Redis client.One of the requirements is to run the redis commands from inside the application as i would run them from the command line redis-cli so...
View ArticleGetting the Active Pool Usage in Lettuce
My team and I have been trying to check different libraries for Redis. We're all new to this implementation. We initially tried Jedis then now we're trying Lettuce. In Jedis, we have added a log to...
View ArticleDistributed locks redis by keys
I am trying to write a solution in order to avoid writes on database in a system that consumes events in any order.I have Elasticsearch as a final database, there are documents containing a lot of...
View ArticleHow to get when was the value updated in redis?
I am using Redis for the cache, I want to update the cache based on when updated last time.Is there any way to get when was the value updated?
View ArticleJedis : Could not get a resource from the pool
BackgroundOur application uses Jedis-2.2.1 and connects to Redis-2.6, here's how I get jedis resource : protected static JedisWrapper getRedisUserWrite(String UDID) { if (redisUserWritePools.get(0) ==...
View ArticleClassNotFoundException while JedisClient initialization in Spring Boot 2.5.4...
I have a Spring Boot 2.5.4 application in which I would like to add Redis and access it via Spring Data Redis. My current configuration looks like this:pom.xml<?xml version="1.0"...
View Articlebucketing data on redis based on list size
I am building a match-making service where matching will be FIFO based. so on every 2nd user, I want both users to get clubbed.How can I achieve it using Redis without locks?My TPS is 10k for finding a...
View ArticleRedissonLocalCachedMap.clear() has a small delay
I noticed that when my code calls RedissonLocalCachedMap.clear() and then immediately reads from it, it doesn't always get a cleared cache. It appears that there is a small delay between calling...
View ArticleIntegration test who checks for /actuator/health fails due to thread named...
I have a Spring Boot microservice in which I recently added the Redis dependencies and we are trying to subscribe to a stream using a consumer group in the production code. In the tests code we have an...
View Articlenotify-keyspace-events in Redis
I'd like to work with Redis for manipulating sessions.But I get failure when running the spring boot app.So I guess that this error is coming from maven dependencies especially version conflicts.Here...
View ArticleSpring boot application fails on startup when Redis server is down
This is a snippet of my configuration class@Configuration@EnableCachingpublic class RedisCacheConfig extends CachingConfigurerSupport {@Beanpublic LettuceConnectionFactory redisConnectionFactory() {...
View ArticleJava Lettuce Reactive Pattern - Catch Errors?
I'm trying to use lettuce instead of Jedis for it's reactive pattern. Jedis can block my vertx eventloop and instead of making it a blocking operation I'd rather have it be reactive.I can successfully...
View ArticleRuntimeException: class not found CLASSNAME while using parallel stream on...
I am trying to run parallel stream and each block of code under one execution makes hundreds of call to redis cluster (AWS Elasticache), but it's failing with below error on EKS cluster whereas same...
View Article