hazelcast/hazelcast-eureka

Can't specify application name to lookup when reusing existing EurekaClient

bberto opened this issue · 2 comments

I'm trying to connect an application named "client-app" to an Hezelcast instance deployed on a different server and registered on Eureka with name "hezelcast-server".

I succeded using a different EurekaClient, setting hezelcast.name on eureka-client.properties. But if I reuse an existing EurekaClient instance the application name is retrieved from related EurekaInstanceConfig, so it's "client-app" and the discovery process fails.

Seems to me that reusing an existing EurekaClient only works when hezelcast is embedded. It would be useful to have an optional property on the factory to specify which application name to lookup on Eureka.

The idea with reusing the existing client is that the application itself is registered in Eureka with clienta-app and Hazelcast is "registered" in Eureka Metadata. Please check the related Code Sample for more information.

If you still encounter issues, could you send the details of how you register Hazelcast server in Eureka and what is your code for the client part?

Closing due to inactivity. @bberto Feel free to reopen if the issue is still valid.