@@ -25,9 +25,24 @@ internal record ConnectionConfig
2525 public Protocol ? Protocol ;
2626 public string ? ClientName ;
2727 public bool LazyConnect ;
28+ public bool RefreshTopologyFromInitialNodes ;
2829
2930 internal FFI . ConnectionConfig ToFfi ( ) =>
30- new ( Addresses , TlsMode , ClusterMode , ( uint ? ) RequestTimeout ? . TotalMilliseconds , ( uint ? ) ConnectionTimeout ? . TotalMilliseconds , ReadFrom , RetryStrategy , AuthenticationInfo , DatabaseId , Protocol , ClientName , LazyConnect ) ;
31+ new (
32+ Addresses ,
33+ TlsMode ,
34+ ClusterMode ,
35+ ( uint ? ) RequestTimeout ? . TotalMilliseconds ,
36+ ( uint ? ) ConnectionTimeout ? . TotalMilliseconds ,
37+ ReadFrom ,
38+ RetryStrategy ,
39+ AuthenticationInfo ,
40+ DatabaseId ,
41+ Protocol ,
42+ ClientName ,
43+ LazyConnect ,
44+ RefreshTopologyFromInitialNodes
45+ ) ;
3146 }
3247
3348 /// <summary>
@@ -584,6 +599,30 @@ public class ClusterClientConfigurationBuilder : ClientConfigurationBuilder<Clus
584599 {
585600 public ClusterClientConfigurationBuilder ( ) : base ( true ) { }
586601
602+ #region Refresh Topology
603+ /// <summary>
604+ /// Enables refreshing the cluster topology using only the initial nodes.
605+ /// <para />
606+ /// When this option is enabled, all topology updates (both the periodic checks and on-demand
607+ /// refreshes triggered by topology changes) will query only the initial nodes provided when
608+ /// creating the client, rather than using the internal cluster view.
609+ /// <para />
610+ /// If not set, defaults to <c>false</c> (uses internal cluster view for topology refresh).
611+ /// </summary>
612+ public bool RefreshTopologyFromInitialNodes
613+ {
614+ get => Config . RefreshTopologyFromInitialNodes ;
615+ set => Config . RefreshTopologyFromInitialNodes = value ;
616+ }
617+
618+ /// <inheritdoc cref="RefreshTopologyFromInitialNodes" />
619+ public ClusterClientConfigurationBuilder WithRefreshTopologyFromInitialNodes ( bool refreshTopologyFromInitialNodes )
620+ {
621+ RefreshTopologyFromInitialNodes = refreshTopologyFromInitialNodes ;
622+ return this ;
623+ }
624+ #endregion
625+
587626 /// <summary>
588627 /// Complete the configuration with given settings.
589628 /// </summary>
0 commit comments