scalecube / scalecube-services

Microservices library - scalecube-services is a high throughput, low latency reactive microservices library built to scale. it features: API-Gateways, service-discovery, service-load-balancing, the architecture supports plug-and-play service communication modules and features. built to provide performance and low-latency real-time stream-processing
http://scalecube.github.io/
Apache License 2.0
610 stars 105 forks source link

NoSuchElementException from Microservices#discovery #771

Closed segabriel closed 4 years ago

segabriel commented 4 years ago

See io.scalecube.services.Microservices#discovery

public ServiceDiscoveryContext discovery(String id) {
  return Optional.ofNullable(compositeDiscovery.contextMap.get(id))
      .orElseThrow(() -> new NoSuchElementException("[discovery] id: " + id));
}

image (1)

artem-v commented 4 years ago

This is where? Under what circkumstances?

segabriel commented 4 years ago

@artem-v io.scalecube.services.Microservices#discovery

segabriel commented 4 years ago

I just put it like

Microservices.builder()

              .discovery("private", privateDiscoveryFactory)
artem-v commented 4 years ago

Fixed at https://github.com/scalecube/scalecube-services/pull/772