Skip to content
Discussion options

You must be logged in to vote

This code worked.

      ClusterTopologyRefreshOptions topologyRefreshOptions = ClusterTopologyRefreshOptions.builder()
                    .enablePeriodicRefresh(Duration.ofSeconds(30))
                    .enableAllAdaptiveRefreshTriggers()
                    .build();

      ClusterClientOptions clusterClientOptions = ClusterClientOptions.builder()
              .topologyRefreshOptions(topologyRefreshOptions)
              .autoReconnect(true)
              .disconnectedBehavior(ClientOptions.DisconnectedBehavior.ACCEPT_COMMANDS)
              .timeoutOptions(TimeoutOptions.builder().build())
              .maxRedirects(DEFAULT_MAX_REDIRECTS * 2)
              .build();
              
…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by pratikgithub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants