skip to Main Content

Redis – Lettuce reactive connection not established

I'm trying to established reactive connection via lettuce, connection @Bean public LettuceConnectionFactory redisConnectionFactory() { return new LettuceConnectionFactory(); } Reactive Redis Template @Bean public ReactiveRedisTemplate<String, Object> reactiveRedisTemplate(ReactiveRedisConnectionFactory connectionFactory) { KryoSerializer<String> kryoSerializer = new KryoSerializer<>(); RedisSerializationContext<String, Object> serializationContext = RedisSerializationContext.<String, Object>newSerializationContext(new StringRedisSerializer())…

VIEW QUESTION

using spring boot data redis template get a null pointer error

config: @Configuration @EnableCaching public class RedisConfig extends CachingConfigurerSupport{ @Bean(name = "template") public RedisTemplate<String, Object> template(RedisConnectionFactory factory) { RedisTemplate<String, Object> template = new RedisTemplate<>(); template.setConnectionFactory(factory); Jackson2JsonRedisSerializer<Object> jacksonSeial = new Jackson2JsonRedisSerializer<>(Object.class); ObjectMapper om = new ObjectMapper(); om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); jacksonSeial.setObjectMapper(om); StringRedisSerializer stringSerial…

VIEW QUESTION

Spring Boot Caching with Redis Sentinel always connects to master node

I have a Spring Boot (2.3.1.RELEASE) app that has caching with Redis Sentinel. This is my configuration for the Sentinel connection: @Bean public LettuceConnectionFactory redisConnectionFactory() { RedisSentinelConfiguration sentinelConfig = new RedisSentinelConfiguration() .master(redisProperties.getSentinel().getMaster()); redisProperties.getSentinel().getNodes().forEach(s -> sentinelConfig.sentinel(s, redisProperties.getPort())); sentinelConfig.setPassword(RedisPassword.of(redisProperties.getPassword())); return new LettuceConnectionFactory(sentinelConfig);…

VIEW QUESTION

Error invoking scheduled task Error instantiating bean of type [io.micronaut.configuration.lettuce.health.RedisHealthIndicator]

I have the following problem when running this schedule. @Singleton public class TaskScheduler { private static final Logger LOG = LoggerFactory.getLogger(TaskScheduler.class); @Inject private BuildLayerJob buildLayerJob; @Scheduled(fixedDelay = "30s", initialDelay = "30s") public void loadRegistriesDescriptions(){ try { LOG.info("Cargando lista de registries…

VIEW QUESTION
Back To Top
Search