-
Notifications
You must be signed in to change notification settings - Fork 254
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
Support for same host different ports apps #105
base: 1.x
Are you sure you want to change the base?
Conversation
if(attributes != null && attributes.get("port") != null){ | ||
String port = attributes.get("port"); | ||
if(other.getAttributes() != null && other.getAttributes().get("port") != null){ | ||
equals &= (port == other.getAttributes().get("port")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is broken. You are comparing strings with "==". It will always be false.
Ups, what a rookie mistake, I was thinking it was an int. This change (when fixed) would make their change redundant...what do you think? |
@spencergibb @reimer-eimer Thinking twice about it... it would make sense that the solution were on Turbine's side. They fixed it in With this PR it would work with any Discovery Server. It would be neccesary to remove |
@codependent I believe that it is not necessary to remove the changes to |
@micheal-swiggs but having
So what would be the point of keeping it? |
Removing the current implementation would break it for those that are using it. |
The current implementation isn't in a Spring Cloud RELEASE version but in a milestone, is it? I don't know Spring Cloud project policy but IMHO if it hasn't made it to a GA version it could be removed without even deprecating it. As long as the next Spring Cloud Build/Milestone referenced a Turbine version that included this PR, nothing would break. |
I found this method in InstanceUrlClosure.java that gives an example of how you can dynamically set the port if you are using your own InstanceDiscovery implementation
|
This pull request solves the problem described in issue 88: being able to have different microservices deployed in the same host with different ports