msemys / esjc

EventStore Java Client
MIT License
108 stars 27 forks source link

HTTPS support for gossip #66

Open andersflemmen opened 4 years ago

andersflemmen commented 4 years ago

As far as I can see, it is not possible for the client to use HTTPS when getting gossip. Any chance that this will be supported? https://github.com/msemys/esjc/blob/5a84f8963cb6b99d30a9a8ffce3f8de04a568ee3/src/main/java/com/github/msemys/esjc/node/cluster/ClusterEndpointDiscoverer.java#L182

msemys commented 4 years ago

will add on the next release.

starting from esjc v2.3.0 you could workaround it by adding custom endpoint discoverer:

class CustomizedClusterEndpointDiscoverer implements EndpointDiscoverer {
  ...
  ...
}

EventStoreBuilder.newBuilder()
  .clusterNodeUsingGossipSeeds(cluster -> cluster
      .gossipSeedEndpoints(asList(new InetSocketAddress("localhost", 1001)))
      .maxDiscoverAttempts(-1))
  .endpointDiscovererFactory((settings, scheduler) -> new CustomizedClusterEndpointDiscoverer(settings.clusterNodeSettings, scheduler))
.build();
andersflemmen commented 4 years ago

Thanks, appreciate it!