0

We are migrating from redis cache to redis with elastic cache. We have two apps on java8. One app is spring boot(2.0.0) with java 8 and other one is a spring app with java 8. They both need to share the elastic cache with ops like save data, read data along with publish and subscriber. With the above mentioned versions of java and spring boot, I could only use spring-data-redis version as 2.0.4. To connect both master and replica relevant Master RedisStaticMasterReplicaConfiguration available from spring-data-redis 2.1 version. Do we have any other way to fulfill my requirement.

Any help on this is much appreciated.

Thanks,

Syamala.

I have tried with RedisStandaloneConfiguration. Here is my code

 final GenericObjectPoolConfig<Integer> poolConfig = new GenericObjectPoolConfig<>();
            poolConfig.setMaxIdle(maxIdle);
            poolConfig.setMinIdle(minIdle);
            poolConfig.setMaxTotal(maxTotal);
            poolConfig.setMaxWaitMillis(maxWait);

            final LettucePoolingClientConfiguration lettucePoolingClientConfiguration =
                    LettucePoolingClientConfiguration.builder()
                            .poolConfig(poolConfig).build();



          final RedisStandaloneConfiguration redisStandaloneConfiguration = new RedisStandaloneConfiguration(master, port);
            
          final org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory = new LettuceConnectionFactory(redisStandaloneConfiguration, lettucePoolingClientConfiguration);

Can you please help me on this. Thanks!

Naga Syamala
  • 41
  • 1
  • 5

0 Answers0