Closed
Description
when looking at redis.adoc, I saw code like below.
@Configuration
class WriteToMasterReadFromReplicaConfiguration {
@Bean
public LettuceConnectionFactory redisConnectionFactory() {
LettuceClientConfiguration clientConfig = LettuceClientConfiguration.builder()
.readFrom(SLAVE_PREFERRED)
.build();
RedisStandaloneConfiguration serverConfig = new RedisStandaloneConfiguration("server", 6379);
return new LettuceConnectionFactory(serverConfig, clientConfig);
}
}
There is one issue in this code, which is that SLAVE_PREFERRED
is deprecated
this has been changed to REPLICA_PREFERRED
and i am going to modify this and send it as a PR to this repository