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

ConfigPropertyBasedDiscovery: support hostname with port #127

Open
BarathArivazhagan opened this issue Aug 12, 2018 · 0 comments
Open

ConfigPropertyBasedDiscovery: support hostname with port #127

BarathArivazhagan opened this issue Aug 12, 2018 · 0 comments

Comments

@BarathArivazhagan
Copy link

while building the list of instances for ConfigPropertyBasedDiscovery, is it possible to support port as part of hostname instead of reading ports from attributes property of Instance?

FROM

turbine:
  aggregator:
      clusterConfig: dev,test,prod
  instanceUrlSuffix: :9502/actuator/hystrix.stream
  ConfigPropertyBasedDiscovery:
    default: 
      instances: localhost 

To

turbine:
  aggregator:
      clusterConfig: dev,test,prod
  ConfigPropertyBasedDiscovery:
    default: 
      instances: localhost:9502,localhost:9503,localhost:9504

Tweaking below code might do the trick:

   String[] parts = instanceList.split(",");

        List<Instance> instances = new ArrayList<Instance>();
        for (String s : parts) {
            instances.add(new Instance(s, cluster, true));
        }

or else provide the users on how to set the port explicitly as part of property for ConfigPropertyBasedDiscovery rather than providing custom implementation of the discovery?

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

1 participant