You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
environment Nacos client version 2.3.2 server Maven dependency 2.2.1
实现的功能: 动态监听微服务的上下线 通过subscribe
Implemented function: Dynamically monitor the online and offline of microservices through subscribe
注册的永久实例 通过/health 健康检查 2.3.2的版本监听不到服务的变化
The registered permanent instance cannot detect changes in the service through version 2.3.2 of/health health check
private EventListener buildEventListener() {
return event -> {
if (event instanceof NamingEvent namingEvent) {
String serviceName = namingEvent.getServiceName();
List<Instance> newInstances = namingEvent.getInstances();
newInstances.forEach(instance -> {
String instanceKey = instance.getIp() + ":" + instance.getPort();
boolean isHealthy = isInstanceHealthy(nacosServerAddr, nameSpace, serviceName, instance.getIp(), instance.getPort());
if (isHealthy) {
log.info("Service health status changed to healthy: {} -> {}", serviceName, instanceKey);
} else {
log.info("Service health status changed to unhealthy: {} -> {}", serviceName, instanceKey);
sendServiceNotification(serviceName, instanceKey, false);
}
});
}
};
}
但是很奇怪的是 用客户端版本2.2.1 可以监听到变化 But it's strange that changes can be detected using client version 2.2.1
The text was updated successfully, but these errors were encountered:
环境 : nacos 客户端版本2.3.2 服务端maven依赖2.2.1
environment Nacos client version 2.3.2 server Maven dependency 2.2.1
实现的功能: 动态监听微服务的上下线 通过subscribe
Implemented function: Dynamically monitor the online and offline of microservices through subscribe
注册的永久实例 通过/health 健康检查 2.3.2的版本监听不到服务的变化
The registered permanent instance cannot detect changes in the service through version 2.3.2 of/health health check
但是很奇怪的是 用客户端版本2.2.1 可以监听到变化
But it's strange that changes can be detected using client version 2.2.1
The text was updated successfully, but these errors were encountered: