public static ServiceDiscovery createDnsServiceDiscovery ( ) { final ServiceDiscoveryBuilder serviceDiscoveryBuilder = ServiceDiscoveryBuilder . serviceDiscoveryBuilder ( ) ; final Vertx vertx = Vertx . vertx ( ) ; final DnsSupportBuilder dnsSupportBuilder = DnsSupportBuilder . dnsSupportBuilder ( vertx ) . setDnsClientSupplier ( new DnsClientFromResolveConfSupplier ( vertx ) ) ; final DnsServiceDiscoveryProviderBuilder dnsServiceDiscoveryProviderBuilder = DnsServiceDiscoveryProviderBuilder . dnsServiceDiscoveryProviderBuilder ( ) . setDnsSupport ( dnsSupportBuilder . build ( ) ) ; return serviceDiscoveryBuilder . setServiceDiscoveryProvider ( dnsServiceDiscoveryProviderBuilder . build ( ) ) . build ( ) ; }
Create service discovery that can talk DNS .