尝试使用此处https://github.com/hazelcast/hazelcast-code-samples/tree/master/hazelcast-integration/springboot-eureka-partition-groups提供的样本。一切顺利,这意味着eureka服务器可以正确注册与启动时一样多的hazelcast群集,eureka客户端可以正常工作,但是my-hazelcast-client样本无法找到在Eureka中注册的任何服务实例。该客户端最后记录的行是:
discoverNodes(): Hazelcast lookup to Eureka: start
调试时,我看到:
org.springframework.cloud.netflix.eureka.EurekaDiscoveryClient
对象作为eurekaClient的org.springframework.cloud.netflix.eureka.CloudEurekaClient
。>com.sun.proxy.$Proxy
对象。尝试使用此处提供的示例https://github.com/hazelcast/hazelcast-code-samples/tree/master/hazelcast-integration/springboot-eureka-partition-groups。一切顺利,这意味着...
示例https://github.com/hazelcast/hazelcast-code-samples/tree/master/hazelcast-integration/springboot-eureka-partition-groups刚刚从Hazelcast 3更新为Hazelcast 4,并通过了验证。