406
questions
0
votes
1
answer
30
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, ...
0
votes
1
answer
30
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> ...
0
votes
1
answer
33
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 ...
-1
votes
0
answers
31
views
Redis scripts performance is poor compared to lettuce library. Why?
I am trying to implement a read heavy operation in Redis. I have loaded a function in redis server to read all the data. Now when I compare the performance of reading data by calling the function vs ...
0
votes
2
answers
34
views
Redis stack lettuce pipeline queries
I need to run several ft.aggregate and ft.search queries in a row - the first query result is the input of the second one and so on. I would like to limit redis round trips so I thought I might use ...
0
votes
0
answers
41
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 ...
0
votes
0
answers
26
views
GCP Memstore Discovery End Point connectivity
We are using spring session which uses Lettuce connection factory to connect to the GCP redis single instance.
We are planning to move to GCP redis cluster which has Discovery End point (single IP ...
0
votes
0
answers
63
views
Simplest way to create Lettuce beans in Spring?
I want to invoke Redis's FUNCTION LOAD and FCALL commands, but there are no corresponding methods in the classes under org.springframework.data.redis package (if there are, please tell me). So I have ...
0
votes
0
answers
26
views
Can ExperimentalLettuceCoroutinesApi for connecting to REDIS be used in production?
hi I am working on a production application to connect to AWS Elasticache REDIS using Kotlin. The TPS in production will be 1M.
I am using Lettuce client and my code is written in kotlin. I came ...
0
votes
0
answers
132
views
Redis read Performance issue using Lettuce with WebFlux
I was trying check the performance of reading Redis data using WebFlux. What I found is since the WebFlux is using single thread to perform the read and deserialize the response (e.g lettuce-...
0
votes
0
answers
47
views
redis cluster subscriber is not working with lettuce
This is my code
public void subscribeToEncounterCheckoutTimeChannel(){
logger.info("Inside subscribeXXXChannel()");
StatefulRedisClusterPubSubConnection<String, String> ...
0
votes
0
answers
47
views
Why does lecttuce send lua script load command to all nodes (including replicas) in redis cluster?
I tried scriptLoad method of Lecttuce with Redis cluster (3 master, 2 replicas, 1 replica down)
Expected: scriptLoad method run successfully
Actual: An error occurred that informed lecttuce could not ...
0
votes
0
answers
78
views
Does lettuce support batch get commands through pipeline for redis in cluster mode?
I am using lettuce library and spring redis template for the redis commands, I am using executePipelined command for fetching multiple keys and the fields stored in hashkeys, do we need to use hastags ...
0
votes
0
answers
55
views
Migrate redis string values to redis JSON documents
I'm currently exploring the possibility of migrating redis string value to JSON and wonder if anyone has successfully done so.
I am using Lettuce as the redis client. Right now my object is JSON ...
2
votes
0
answers
263
views
Upgrade to spring boot 3.2.2 got exception : org.springframework.data.redis.RedisSystemException: Redis command interrupted
After updating an application from Spring Boot 2.7 to Spring Boot 3.2.2, I encountered intermittent org.springframework.data.redis.RedisSystemException: Redis command interrupted exceptions in a high-...
0
votes
0
answers
50
views
spring-data-redis lettuce caused off-heap memory ?why is off-heap memory?
in a production environment, direct use of redis pipeline policy of spring-data-redis , under certain conditions(it could be the Internet.), will cause off-heap memory to continue to rise, what is the ...
0
votes
0
answers
37
views
Not able to inject RedisCache/SyncCache/StatefulRedisConnection beans in micronaut 4.2.1 version
We are using Micronaut 2 with Redis and jdk11 in my aws lambda application. We have upgraded jdk17 with micronaut 4. As part of the upgrade, we are facing issue with Redis and getting io.micronaut....
0
votes
0
answers
64
views
lua script from java (io-lettuce-core)
I am trying to run a Lua script from lettuce like this that does an hgetall command on a remote Redis:
private static String SCRIPT_CONS = "local hgetallkeys = function(key)" +"\n" ...
0
votes
0
answers
46
views
Redis Cluster performance not increasing linearly with Lettuce
Redis Cluster performance not increasing linearly:
Ran the perf on GCP Cloud:
Machine Type: c3-highmem-4 (vCPU: 4 Memory: 29GB)
Standalone Redis:
SET ops/sec: 243,858 (243K) {benchmarking using ...
0
votes
0
answers
88
views
Multiple connections are used even when shareNativeConnection is enabled in spring-data-redis LettuceConnectionFactory
We are using spring-data-redis with lettuce under the hood. 'shareNativeConnection' is enabled by default. We currently only have get and set calls to Redis.
From the connection event logs, I see ...
0
votes
1
answer
98
views
Redis two operations performing in single command like String command and Hash command at a time for fetching their values from Redis Server
I have a query regarding redis two operations performing in single command like String command and Hash command at a time
for fetching their values from Redis Server.
SET key1 value1
SET key2 value2
...
0
votes
0
answers
51
views
Spring data redis LettuceConnectionFactory : sharedConnection is shared across multiple RedisTemplate instances resulting in unexpected behavior
I have a requirement of connecting to tow Redis hosts from same application. Host to be connected to is based a runtime condition for failover. I have created 2 RedisTemplate instances with separate ...
0
votes
0
answers
104
views
Redis client Lettuce can't connect to embedded RedisServer but Jedis can connect
1、Jedis connect success
@Test
public void test() throws Exception {
RedisServer redisServer = RedisServer.builder()
.setting("maxmemory 128M")
.port(...
1
vote
0
answers
101
views
Connecting to Cloud Redis Instance using Lettuce
I have a Redis Memoryspace instance in Google Cloud and I'm trying to connect to it from my Java App. If I try to connect to it using google cloud shell i succeed using these commands:
gcloud ...
0
votes
0
answers
172
views
Redis Lettuce not distributing requests to all slave instances in v5.1
I'm currently using lettuce client in micronaut for redis connection. The current version is 5.1 where in the lettuce-core library being used is 6.1.6-Release.
I have a high tps application where in ...
1
vote
0
answers
134
views
Lettuce client not able to detect Redis failure immediately
I have a latency sensitive application which uses Lettuce client to connect to an AWS ElastiCache Redis cluster. If there is a cache miss, it goes to ElasticSearch for getting the required data.
I am ...
0
votes
0
answers
172
views
Redis Lettuce: Transaction with different codecs
I'm working with Lettuce (the Java Redis Client) and I need to update several keys within one transaction, some of which are Strings and some are ByteArrays.
Without transactions, I'm just using ...
0
votes
0
answers
330
views
Lettuce.io - How to prevent a Redis channel becoming inactive?
I have an application that is using the lpush command to push some data to a queue, another application is constantly polling that queue to look for elements, if it finds one (using brpop), it will ...
0
votes
1
answer
98
views
How to test interactions inside of a Futures `whenComplete` method
I have a class thats a wrapper around the Lettuce Redis client that puts objects into redis and records a few metrics when the future completes inside of its whenComplete. The class under test looks ...
-1
votes
1
answer
66
views
Using static redis connections in multithreaded env in Java
I want to improve the performance of my Redis read/writes, by reusing the connection object. So, I am making it static in the class, and my get() and set() functions are using this static connection.
...
0
votes
0
answers
167
views
What does it mean when Lettuce Core logs indicate missing epoll and kqueue libraries during initialization?
I am using the Lettuce Core library, a Java Redis SDK, and noticed the following logs during the client initialization:
Dec 05, 2023 3:48:47 PM io.lettuce.core.EpollProvider <clinit>
INFO: ...
0
votes
0
answers
137
views
Micronaut Redis Test Resources not working
I am not able to get Test Resources (Redis) running in our project.
I am not able to find the problem in a couple of days. I started a new minimal project to identifier and isolate the problem, which ...
0
votes
0
answers
41
views
MDC with Lettuce's RedisFuture
I am using lettuce-core 6.2.6.RELEASE with Kotlin 1.9.10.
I'm currently using lettuce to subscribe to channels and would like to log with the parent thread's MDC context when a message is received ...
0
votes
0
answers
43
views
Circuitbreaker object inside a class on a spark executor
I have a Kafka Structured Streaming Application, and a class with a method that is run on every record inside a mapPartition. This method contains a call to Redis (Lettuce Client) that I want to add ...
1
vote
0
answers
594
views
Redis Lettuce TimeoutOptions versus Spring commandTimeout in cluster deployment
In Lettuce, there are various timeout settings, primarily focusing on connection timeouts and command timeouts. When I attempted to configure Lettuce, I discovered that there are two distinct types of ...
0
votes
0
answers
313
views
Spring Boot - lettuce-core and netty issue: java.lang.NoClassDefFoundError: io/netty/util/Recycler$EnhancedHandle
Could you please give any insight about how to solve it this error?
The error popped up when I changed the version of aws to 2.20.161.
Unable to connect to [cache]: Caused by: java.lang....
0
votes
1
answer
223
views
Redis Lettuce Client Command Latency Event Wasn't Retrieved in the subscriber
Command latency event wasn't retrieved in the subscriber
The code implementation of command latency monitoring using Letuce Redis client in Spring Boot MVC app didn't collecting any command latency ...
0
votes
0
answers
86
views
lettuce 5.2.1.RELEASE OutOfDirectMemoryError,direct memory。 why?
Business background
Asynchronous multi -threaded call,
question: Why does OOM happen? Help, can you explain it analyzed?
Abnormal log
14:35:38.039 [lettuce-epollEventLoop-10-6] WARN io.lettuce....
1
vote
1
answer
847
views
Is it possible to find keys which are on different shards using Lettuce using Spring Data Redis
I am using Spring Data Redis in my API. I am trying run the following command through Java:
Set<String> union = redisTemplate.opsForSet().union(ids);
which is causing CROSSSLOT Keys in request ...
1
vote
0
answers
163
views
Getting org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [byte]
I am using spring boot + redis database + 'org.springframework.boot:spring-boot-starter-data-redis' in my project.
My repo class has this method accountRepository.findAllByBankId(bankIds) here bankIds ...
0
votes
0
answers
170
views
SpringCloud Gateway high CPU utilization of 99%
We have 4 gateway services in different servers. The CPU utilization of one server suddenly increased to 99% serveral days ago. And it has bean holding like this from then.We used command top -p -H ...
0
votes
1
answer
342
views
Does Lettuce work synchronously by default? (Spring Data Redis)
Lettuce github: https://github.com/lettuce-io/lettuce-core/issues/1085
1 “Spring Data Redis uses Lettuce’s synchronous and reactive API.” it says
Does that mean it works basically synchronously?
I ...
0
votes
1
answer
238
views
Does springDataRedis not support native-image of graalvm?
My project is based on spring boot 3, and my code runs without any issues under the jvm. However, when I compile and run it under Linux using grailvm, I encountered an error
The error is as follows:
...
0
votes
0
answers
673
views
Redis envoy proxy
I tried to set up Redis as an Envoy proxy from this example https://github.com/envoyproxy/envoy/tree/main/examples/redis. The problem is it does not support some commands like HELLO and INFO in Spring ...
0
votes
0
answers
2k
views
Spring Boot Redis - Lettuce is not creating connection pool
I am using spring-boot-starter-cache for redis interaction and below is the code which I am using to intialize the configurations :
@Autowired
private LettuceConfigProperties ...
1
vote
0
answers
595
views
Lettuce redis client command retry mechanism
Is there any mechanism in the lettuce client to retry the command if it doesn't receive a response in some time?
I have observed that lettuce is retrying the command after 200 ms if the response is ...
0
votes
1
answer
138
views
How to connect to the azure redis cache instance which is clustered with using redis clustered client in lettuce?
I have created azure redis cache instance with clustering enabled, When I tried to connect with redis clustered client using lettuce library by inputting host address it returns Cannot retrieve ...
0
votes
0
answers
346
views
Exception when creating a GenericObjectPool using lettuce-mod
Lettuce-mod 3.6.0 and commons-pool2 2.11.1
We are creating the redis client:
this.client = RedisModulesClient.create(redisURI);
And right after the pool as it's shown in the github lettucemod page:
...
0
votes
1
answer
3k
views
use multiple redis configuration spring boot
i need two redis configuration one for my tokens and one for my invoices
then i need to use them in different middlewares or controllers
here its my InvoiceRedisConfiguration
@Configuration
public ...
0
votes
1
answer
446
views
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: lettuce redis cluster error
I've a below java program to connect to a secured redis cluster.
package org.example;
import io.lettuce.core.RedisURI;
import io.lettuce.core.SocketOptions;
import io.lettuce.core.TimeoutOptions;
...