Im new to Cassandra and i have seen some projects where in Spring Boot Cassandra connection is configuration with either CqlSession or Cluster, and i would like to know the difference.
CqlSession is from com.datastax.oss.driver.api.core and Cluster com.datastax.driver.core.
I have a requirement for Retry Policy , but not getting this option in CqlSession configuration. is there any way to implement this with CqlSession ?, same Retry policy option is available with Cluster configuration as shown below.
using CqlSession
CqlSession session = CqlSession .builder() .withLocalDatacenter("Cassandra") .addContactPoint(new InetSocketAddress("127.0.0.1", 9252)) .withKeyspace(keyspace) .build()
using Cluster
Cluster cluster = Cluster .builder() .addContactPoint("127.0.0.1") .withRetryPolicy(new MyCustomRetryPolicy()) .build()
Thanks