Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mgoldver opened this issue Jun 5, 2020 · 2 comments

Comments

@mgoldver
Copy link

mgoldver commented Jun 5, 2020

The setup:

  • Spring-boot service S1 registers with discovery service via discovery client DC1.
  • This service S1 needs to connect to Hazelcast cluster (which is also registered with the same discovery service).
  • Hazelcast client config also needs discovery client DC2 configured to discover Hazelcast cluster nodes.

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
Copy link

leszko commented Mar 4, 2021

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

@mgoldver
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants