-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
Add spring.redis.lettuce.read-from property for configuring LettuceClientConfiguration's read from setting #42576
Comments
Hi @nosan @wilkinsona , is there any update on this? |
Hi @thiagoteichmann, The issue is still in progress. Before moving forward, @wilkinsona reached out to the Lettuce team to request support for more complex ReadFrom types, such as I've created a PR: redis/lettuce#3016. Once it's merged, I believe it would be possible to support this in Spring Boot as well. |
However, please keep in mind that I'm just a contributor, so it would be best to wait for @wilkinsona's feedback. |
Sure, no worries, thanks for the update! 👍🏻 |
@thiagoteichmann are you using snake_case because it is a requirement, or could you also work with kebab-case, e.g. spring.redis.lettuce.config.read-from=replica-preferred It would help us consider how we should implement the solution in the end greatly if we know more about your use case. |
@tishun Boot's relaxed binding can take various different property formats so, personally, I wouldn't worry about handling multiple formats in Lettuce. I'd just pick one and stick with it and leave Boot to deal with that complexity. |
@wilkinsona |
Boot can bind enums and similar in a relaxed form as well (see |
I think kebab would be clearer for me. in my case I might have reads coming from replicas instead of the default master and your sample would be an exact scenario. My original example was just copied from the enum value. :) |
Closing in favor of #42588. |
Currently using Lettuce but noticed that config properties lacks readFrom property and require code change to implement it, would be possible to externalize this in a property so we can override the default?
I currently have a redis sentinel totally configured by properties but I cannot configure read from property the same way.
Something like:
or
Originally opened a ticket against spring data redis but was requested to open a ticket here.
The text was updated successfully, but these errors were encountered: