hazelcast / hazelcast-eureka

Hazelcast Discovery SPI Plugin for Netflix' Eureka Service Discovery V1
Other
30 stars 27 forks source link

Eureka enabled Spring-boot service with hazelcast client and EurekaOne discovery not able to reuse existing discovery client #54

Open mgoldver opened 4 years ago

mgoldver commented 4 years ago

The setup:

The ask: allow DC1 to be used for Hazelcast client discovery by proving the ability to supply Hazelcast cluster name (using metadata property for example).

More explicitly, EurekaOneDiscoveryStrategy.discoverNodes() method determines "applicationName" by calling applicationInfoManager.getEurekaInstanceConfig().getAppname(). This creates an issue since "applicationName" returned is the name under which the service S1 is registered with Eureka instead of the name of the application under which the Hazelcast cluster is registered.

leszko commented 3 years ago

Hi @mgoldver , would using use-metadata-for-host-and-port solve your issue?

mgoldver commented 3 years ago

Hi @leszko, unfortunately not, we already use use-metadata-for-host-and-port option. The problem is that there is no way to reuse the same discovery client if the app is already using it to register itself with Eureka.