-
Notifications
You must be signed in to change notification settings - Fork 167
In the yaml, if rsocket.brokers is list, RSocketBrokerHealthIndicator
is not registered.
#239
Comments
rsocket.broker.topology=gossip |
The above properties are used by the Line 166 in fdd39b3
@Bean
@ConditionalOnProperty("rsocket.brokers")
public RSocketBrokerHealthIndicator rsocketBrokerHealth(RSocketEndpoint rsocketEndpoint, UpstreamManager upstreamManager, @Value("${rsocket.brokers}") String brokers) {
return new RSocketBrokerHealthIndicator(rsocketEndpoint, upstreamManager, brokers);
} If you use rsocket.brokers=tcp://localhost:9999 rsocket:
brokers: tcp://localhost:9999 However, if you use an array of strings, it won't register. rsocket:
brokers:
- tcp://localhost:9999 This is fine for practical use, but kubernetes scheduler can't perform health checks properly because the health indicator is not registered. |
Sorry for last reply. But it works for me. Envirements:
Code:
|
Array indentation should be 2 space in your yaml file. |
I've been using Line 167 in fdd39b3
In the yaml, if rsocket.brokers is a list, then RSocketBrokerHealthIndicator is not registered.
rsocket:
brokers: tcp://127.0.0.1:9999
jwt-token: None
management:
endpoint:
health:
show-details: always curl http://localhost:8080/actuator/health/rsocketBrokerHealth
rsocket:
brokers:
- tcp://127.0.0.1:9999
jwt-token: None
management:
endpoint:
health:
show-details: always curl http://localhost:8080/actuator/health/rsocketBrokerHealth -->
|
You are right, there's a bug in the method rsocketBrokerHealth of class com.alibaba.spring.boot.rsocket.RSocketAutoConfiguration. CODE:
|
Describe the bug
In the yaml, if
rsocket.brokers
is a list, thenRSocketBrokerHealthIndicator
is not registered.If it is a string, then
RSocketBrokerHealthIndicator
is registered.Environment
Steps to reproduce this issue
http://localhost:8080/actuator/health
Pls. provide GitHub address to reproduce this issue.
alibaba-rsocket-broker/alibaba-rsocket-spring-boot-starter/src/main/java/com/alibaba/spring/boot/rsocket/RSocketAutoConfiguration.java
Line 166 in fdd39b3
Expected Result
Actual Result
The text was updated successfully, but these errors were encountered: