EventStore / EventStoreDB-Client-Java

Official Asynchronous Java 8+ Client Library for EventStoreDB 20.6+
https://eventstore.com
Apache License 2.0
63 stars 20 forks source link

Add support for direct DNS lookups behind a feature flag. #288

Closed YoEight closed 1 week ago

YoEight commented 1 week ago

Added: Add support for direct DNS lookups behind a feature flag.

Fixes #273

description

With this feature, the client will directly perform DNS lookups when probing for candidates during the connection process to a cluster of nodes. This mirrors the behavior from when the TCP API was still supported.

You can enable that feature using a connection string or a the connection builder.

connection string

esdb+discover://my.esdbcluster.com:1234?feature=dns-lookup

connection builder

     EventStoreDBClientSettings.builder()
        .dnsDiscover(true)
        .addHost("my.esdbcluster.com", 1234)
        .feature("dns-lookup")
        .buildConnectionSettings()