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

Record retrieval with ConsulServiceDiscovery may be incorrect #43

Closed
nedcg opened this issue Sep 27, 2016 · 3 comments
Closed

Record retrieval with ConsulServiceDiscovery may be incorrect #43

nedcg opened this issue Sep 27, 2016 · 3 comments

Comments

@nedcg
Copy link

nedcg commented Sep 27, 2016

Once i retrieve a service reference trough ConsulServiceDiscovery, i'm getting:

Vertx record:
screen shot 2016-09-27 at 5 47 20 pm

Consul Service:
screen shot 2016-09-27 at 6 14 01 pm

i think the location.host should be the ServiceAdress and not the Consul node Address...

Im using vertx 3.3.3

@nedcg nedcg changed the title Record creation with ConsulServiceDiscovery may be incorrect Record retrieval with ConsulServiceDiscovery may be incorrect Sep 27, 2016
@nedcg
Copy link
Author

nedcg commented Sep 28, 2016

Now i understand the problem.

Currently vertx assume that in the service definition "Node.Address" is always pointing to the service address but this seems only correct when the service is in a container running a consul agent, if the service container does not have a consul agent, the service definition "Node.Adress" will contain the consul server address.

@faferreyra
Copy link

Found the same problem. I think it's wrong to use the Node.Address value, as it advertises the Consul agent that registered the service.

I would push a PR with my "opinionated" fix, but it's open to discussion.

@cescoffier
Copy link
Member

Should be fixed by #62

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

No branches or pull requests

3 participants