Class ReactiveCompositeDiscoveryClient

java.lang.Object
org.springframework.cloud.client.discovery.composite.reactive.ReactiveCompositeDiscoveryClient
All Implemented Interfaces:
ReactiveDiscoveryClient, org.springframework.core.Ordered

public class ReactiveCompositeDiscoveryClient extends Object implements ReactiveDiscoveryClient
A ReactiveDiscoveryClient that is composed of other discovery clients and delegates calls to each of them. By default, instance lookup uses the fastest non-empty response. Client ordering can instead be enforced by using the constructor accepting orderEnforced. Instance results can be combined from all discovery clients by enabling combineInstances.
Author:
Tim Ysewyn
  • Constructor Details

    • ReactiveCompositeDiscoveryClient

      public ReactiveCompositeDiscoveryClient(List<ReactiveDiscoveryClient> discoveryClients)
    • ReactiveCompositeDiscoveryClient

      public ReactiveCompositeDiscoveryClient(List<ReactiveDiscoveryClient> discoveryClients, boolean orderEnforced)
    • ReactiveCompositeDiscoveryClient

      public ReactiveCompositeDiscoveryClient(List<ReactiveDiscoveryClient> discoveryClients, boolean orderEnforced, boolean combineInstances)
      Create a composite discovery client.
      Parameters:
      discoveryClients - the discovery clients to delegate to
      orderEnforced - whether to wait for each client in order before falling back to the next client if it returns no instances
      combineInstances - whether to combine instances returned by all discovery clients
  • Method Details