bhuvi-maheshwari commented on issue #915:
URL: 
https://github.com/apache/cassandra-gocql-driver/issues/915#issuecomment-2437939243

   @dkropachev Here is the cassandra setup
   
   clusterConfig := gocql.NewCluster(ips...)
   clusterConfig.Port = port
   clusterConfig.Keyspace = keyspace
   clusterConfig.SslOpts = &gocql.SslOptions{CaPath: certpath}
   clusterConfig.Consistency = gocql.LocalQuorum
   clusterConfig.Authenticator = gocql.PasswordAuthenticator{
        Username: uname,
        Password: password,
   }
   clusterConfig.ProtoVersion = 4
   // Set retry policy to retry 3 times in case of transient failures
   // clusterConfig.RetryPolicy = &gocql.SimpleRetryPolicy{NumRetries: 3}
   clusterConfig.ReconnectInterval = time.Duration(interval) * time.Second
   clusterConfig.Timeout = time.Duration(timeout) * time.Second
   clusterConfig.DisableInitialHostLookup = false
   clusterConfig.ReconnectionPolicy = ReconnectionPolicy{maxRetries: 4, delay: 
time.Duration(400) * time.Millisecond}
   s := new(StorageRepository)
   s.ClusterConfig = clusterConfig
   if s.Session, err = clusterConfig.CreateSession(); err != nil {
        log.Fatalf("cassandra.NewStorage => DATABASE_CONNECT_ERROR: %s", 
err.Error())
   }


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to