Lettuce connection factory, which is both reactive and non-reactive, has two active health indicators when running Boot 2.2.0.
Output of /actuator/health:
{
"status":"UP",
"components":{
"redis":{
"status":"UP",
"details":{
"cluster_size":2,
"slots_up":16384,
"slots_fail":0
}
},
"redisReactive":{
"status":"UP",
"details":{
"version":"5.0.5"
}
}
}
}
Only reactive indicator was active in Boot 2.1.
@philwebb,
It looks like that bug affects all HealthIndicators, not only Redis.
Previously, @ConditionalOnMissingBean(name="...") was the same for both indicators, now it different.
For this particular case:
@ConditionalOnMissingBean(name = { "redisHealthIndicator", "redisHealthContributor" })
public HealthContributor redisHealthContributor(Map<String, RedisConnectionFactory> redisConnectionFactories) {
return createContributor(redisConnectionFactories);
}
@Bean
@ConditionalOnMissingBean(name = { "redisReactiveHealthIndicator", "redisReactiveHealthContributor" })
public ReactiveHealthContributor redisReactiveHealthContributor() {
return createContributor(this.redisConnectionFactories);
}
}
This commit: f09e0264d9195f6c4dacabe07a51836058092dbf added these changes
Most helpful comment
@philwebb,
It looks like that bug affects all
HealthIndicators, not onlyRedis.Previously,
@ConditionalOnMissingBean(name="...")was the same for both indicators, now it different.For this particular case:
This commit: f09e0264d9195f6c4dacabe07a51836058092dbf added these changes