如果Eureka客户端没有通过设置eureka:client:registerWithEureka:false来向eureka服务器注册自己,那为什么fetchRegistry属性也需要设置为false呢?
最佳答案
registerWithEureka
控制这个客户端是否注册自己,因此变成 可发现 .这本身并不意味着该客户端将获取有关其他服务端点的信息并因此能够连接到它们。fetchRegistry
控制此客户端是否要尝试连接到 Eureka 服务器以下载有关其他服务端点的信息。它可以在不注册自己的情况下这样做。
引用 documentation :
Fetch Registry
Eureka clients fetches the registry information from the server and caches it locally. After that, the clients use that information to find other services.
关于java - eureka服务器中fetchRegistry属性有什么用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57639611/