Questions tagged [lettuce]

Lettuce can stand for two things: * A behavior-driven development (BDD) tool for Python: http://lettuce.it/ * A Redis client for Java: http://lettuce.io

Filter by
Sorted by
Tagged with
-2 votes
0 answers
18 views

Is it possible to kill the JVM when an OOME occurs in a direct buffer? [closed]

I'm using lettuce, but if OME occurs in direct buffer, the data is twisted. If OOME occurs due to direct buffer, I want to kill JVM, is there a way? -XX:+ExitOnOutOfMemoryError is being used, but it ...
user3217223's user avatar
-1 votes
1 answer
22 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. ...
Rohitesh's user avatar
  • 977
0 votes
0 answers
13 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: ...
Nipuna Ranasinghe's user avatar
0 votes
0 answers
21 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 ...
Kenny's user avatar
  • 1
0 votes
0 answers
12 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 ...
Tom MacKenzie's user avatar
0 votes
0 answers
24 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 ...
Swathi Mudda's user avatar
0 votes
0 answers
27 views

why redis client lettuce expire method accept parameter long, but convert to int in method

enter image description here enter image description here when i use lettuce api expire mehthod, method accept long seconds,but this seconds will convert to int value with function: IntegerArgument....
ppppgr's user avatar
  • 1
0 votes
0 answers
68 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 ...
chl's user avatar
  • 359
0 votes
0 answers
81 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....
Pier Zegarra Reymundo's user avatar
0 votes
1 answer
35 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 ...
Varid Vaya's user avatar
0 votes
0 answers
29 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....
soulx's user avatar
  • 1
1 vote
1 answer
231 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 ...
Sukh's user avatar
  • 418
0 votes
0 answers
40 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 ...
Sukh's user avatar
  • 418
0 votes
0 answers
71 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 ...
Tomcat's user avatar
  • 1
0 votes
1 answer
47 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 ...
firefly_0's user avatar
0 votes
0 answers
32 views

How do I make it asynchronous?

@Configuration public class RedisConfig { @Value("${spring.redis.session.host}") private String hostName; @Value("${spring.redis.session.port}") private int port; ...
firefly_0's user avatar
0 votes
0 answers
42 views

How to publish message dynamically to channel(my custom domain) in pub/sub with spring data redis

In my RedisMessageListenerContainer I have registered the channel like below. Both publish message to that specific and subscribe are working good. But I need to publish message dynamically to my ...
Naga Syamala's user avatar
0 votes
0 answers
85 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: ...
chrischou's user avatar
0 votes
0 answers
187 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 ...
Iman Ahrari's user avatar
0 votes
0 answers
130 views

Arbitrary io.lettuce.core.RedisCommandTimeoutException in Lettuce Redis client

We are using Lettuce through Spring Data Redis and Redis Server is a GCP Memorystore service. We have a simple Redis Standalone Configuration in our application where a single RedisClient is shared ...
Madala's user avatar
  • 291
0 votes
0 answers
30 views

Inconsistent behaviour of lettuce when pooling different topics from redis server inside kubernetes

I am currently encountering some issues when trying to pool from two different topics of a Redis server via lettuce inside a Spring Boot application inside a Kubernetes cluster. Whereas pooling ...
hikari_temp's user avatar
0 votes
0 answers
778 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 ...
Ajay Pilaniya's user avatar
0 votes
0 answers
136 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 ...
VJS's user avatar
  • 2,881
0 votes
0 answers
221 views

how to create new connection with redis on each request with username and password using spring data redis?

I am using spring data redis to connect to standalone redis. I am using LettuceConnectionFactory to create initial connection with redis with default user but after connection has been established I ...
Roshan Jha's user avatar
0 votes
1 answer
50 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 ...
Kapilraaj Perinpanayagam's user avatar
0 votes
0 answers
164 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: ...
JBalaguero's user avatar
0 votes
1 answer
1k 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 ...
Masoud Niki's user avatar
0 votes
0 answers
79 views

How to use Jedis client in Spring Session Redis

How to use Jedis client in Spring Session Redis Is there a way to use Jedis instead of Lettuce in spring session. It seems like spring-session-data uses Lettuce by default. Is there a way to override ...
Hemanth K N's user avatar
0 votes
1 answer
153 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; ...
user51's user avatar
  • 9,111
0 votes
0 answers
89 views

How to Load Redis Function in TestContainer Before Unit Test?

I have created a test container for unit testing, and I need to load some functions for a custom Redis Lettuce command. Typically, I would load a script using a Redis CLI command like this: cat mylib....
Trevor's user avatar
  • 361
0 votes
1 answer
99 views

how to used to spring-lettucemod create index on json(java)

enter image description hereenter image description here I create a redissearch index with spring-lettucemod,but the Index is Hash type ,not the JSON type,I can't find the Options to change the Hash ...
Samuel_liu's user avatar
0 votes
1 answer
256 views

Spring boot Native Graalvm + Redis Error creating bean RedisConnection

I am building spring boot native app with redis. named: systemparam. spring boot 3.1, gradle lettuce as connection factory graalvm-ce-java17-22.3.2 build.gradle plugins { id 'java' id 'org....
Raey Juve's user avatar
0 votes
1 answer
946 views

How to prevent memory leaks caused by threads in Tomcat9 and Netty when using Lettuce with Spring?

I am using io.lettuce.core.api.StatefulRedisConnection from GenericObjectPoolConfig to connect Paas Redis. Configure: @Bean public GenericObjectPoolConfig redisPoolConfig() { ...
Felix's user avatar
  • 1
0 votes
0 answers
226 views

What is the best way to implement distributed locks in Redis, for Kotlin service and Spring Boot application?

I am working on a scenario where i want to implement distributed redis lock in my service. The service is built in Kotlin and Spring Boot (i am new to both). The requirement is to acquire lock in one ...
shubham saxena's user avatar
0 votes
0 answers
52 views

How can I fetch RedisJSON and RedisTimeSeries values using Lettuce

I have an existing codebase that uses Jedis to enumerate and fetch diverse values from Redis: strings, hash, set, list, etc. as well as RedisJSON and RedisTimeSeries. I am considering the replacement ...
Martin Cowie's user avatar
  • 2,789
0 votes
0 answers
84 views

Disable Redis autoconfiguration in Micronout

How can I disable Redis (Lettuce) autoconfiguration in Micronaut framework? It wants to do all the configuration on the code side, example: RedisClient redisClient = RedisClient .create("redis:/...
Savitar's user avatar
2 votes
2 answers
1k views

LettuceConnectionFactory defaults to localhost connection instead of host specified in application.yml

Upon trying to connect to a remote Redis instance hosted in AWS from a SpringBoot application, RedisConnectionFactory keeps attempting to connect to localhost:6379 even although the target host has ...
LeperAffinity666's user avatar
1 vote
1 answer
551 views

RedisTemplate get list with value operation

It is possible to get back a List of Objects using RedisTemplate get value operation? Currently my code looks like this: public class RedisDao { private final RedisTemplate<String, List<Object&...
Robert S.'s user avatar
0 votes
0 answers
44 views

Lettuce-Core-6.2.x Caused by: java.lang.NoClassDefFoundError: io/netty/resolver/AddressResolverGroup

While migrating from biz.paluch.redis.lettuce-4.4.6.Final to io.lettuce.lettuce-core-6.2.x, I am seeing the below exception - Exception Here's the dependency I am using - <dependency> &...
Sheenu's user avatar
  • 1
0 votes
0 answers
284 views

how to fix "Caused by: java.lang.IllegalStateException: executor not accepting a task" when refresh lettuceConnectionFactory

I want to manually refresh lettuceConnection when changed properties on zookeeper. (because I don't want to restart my server when it's working) The following code is my zookeeper listener: ..... log....
carrisia.zheng's user avatar
0 votes
0 answers
40 views

lettuce 6.1.8 unable to connect to redis

When upgrading to springboot2.6.9, the lettuce should be upgraded to 6.1.8, and at the same time, the software should be upgraded to redis6.2.7. When the project is started, redis cannot be connected ...
ruifeng che's user avatar
1 vote
0 answers
696 views

Connecting to Redis cluster using Lettuce lib and TLS (Trust store and key store)

I am able to connect to Redis via redis-cli --tls --cert ~/cert/test/redis.example.com.chain.pem --key ~/cert/test/redis.example.com.key \ -h [redis-endpoint] -p 6379 and auth username password And ...
JShao's user avatar
  • 41
0 votes
0 answers
30 views

reactive redis hgetall processing

What is the code below lacking to initiate processing here, apparently this code does nothing, in this form. I can call the block on flux result and collect in a list and process without using the ...
Mark1234's user avatar
  • 599
0 votes
1 answer
1k views

NOPERM issue in Redis Connection

@Bean fun redisConnectionFactory(): LettuceConnectionFactory { val redisConfiguration = RedisClusterConfiguration().apply { val (host, port, username, password) = ...
zeto's user avatar
  • 1
0 votes
0 answers
206 views

How to fix OutOfMemory happened with Lettuce Redis

We are using spring data Redis Reactive(with lettuce). Application instance freezed with OutOfMemory Error. Analysis of the heap dump shows that 128 instances of DefaultEventExecutor occupied the ...
user1433374's user avatar
1 vote
2 answers
1k views

Lettuce creates a new connection to redis before every operation

I'm using lettuce as my connectionFactory in a spring-boot application to connect to redis. It creates a new connection every time before an operation. Checked with the MONITOR command and profiler, ...
saket agarwal's user avatar
0 votes
0 answers
196 views

Setting ReadFrom.REPLICA_PREFERRED results in Lua scripts executed against read replicas

I am using the Spring Data Redis library for an application that executes Lua scripts against a Redis cluster. Everything works great until I add the following bean: @Bean public ...
Kostas's user avatar
  • 343
0 votes
1 answer
299 views

Have read-only Lua script executed against read replicas in a Redis cluster

I have: A Redis cluster with primary nodes and read replicas. Lua scripts that write data (keys). Lua scripts that only read data. I want to have the read-only Lua scripts executed against replicas ...
Kostas's user avatar
  • 343
0 votes
1 answer
363 views

Lettuce behavior when redis db is down

We are using lettuce in our redis based api (spring boot). Do we need to implement circuit breaker in our api in case redis database goes down OR lettuce connection pool (using the default connection ...
Sukh's user avatar
  • 418
2 votes
0 answers
863 views

How to set TTL for DNS cache in Lettuce/Redis Connection in Springboot 3

Our production system experienced a Redis connection timeout due to an outdated IP address returned by DNS lookup after Amazon AWS performed a system update on Elastic Cache cluster. To prevent this ...
Tiger's user avatar
  • 21

1
2 3 4 5
8