-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DefaultRedisClusterClientFactory uses default StringCodec #536
Comments
seems like you diagnosed the problem, would you send a PR? |
@herisn23 are you interested in a PR? Otherwise I also intend to contribute on this as we faced with this issue too. |
yibo-long
added a commit
to yibo-long/micronaut-redis
that referenced
this issue
Aug 31, 2024
Created #571, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is a issue with RedisCodec when using different environment configuration (cluster, non-cluster) when using custom codec.
When developing on localhost i use standalone non-cluster redis. This configuration uses codec created in my factory class.
But
DefaultRedisClusterClientFactory
bypassing this codec because not provide codec when callclient.connect()
like in non-cluster configuration.This behaviour causes errors on kubernetes where redis-cluster running, because connection uses default lettuce StringCodec instead of user-defined codec.
It is possible to inherit AbstractRedisClientFactory<K, V> like in DefaultRedisClientFactory and create StatefulRedisClusterConnection with user defined codec?
For now i have work around for this issue with custom configuration but i wont have this code in my app.
This is the class which, i think, need improvements.
micronaut-redis/redis-lettuce/src/main/java/io/micronaut/configuration/lettuce/DefaultRedisClusterClientFactory.java
Line 45 in 80009dc
The text was updated successfully, but these errors were encountered: