Driver should automatically pickup contact points when Stargate is introduced to a cluster

Description

Driver should automatically pick up contact points when Stargate is introduced to a cluster. Without this automatic resolution, the client application must be restarted resulting in downtime.

Driver being used is 3.10.2.
Here are some examples of code being used to access the cluster:

session = CqlSession.builder() .withCloudSecureConnectBundle(Paths.get(bundle)) .withAuthCredentials(username, password) .withKeyspace(keyspace) .build(); private CqlSession createCloudCqlSession() { return standardCqlSessionBuilder() .withCloudSecureConnectBundle(Paths.get(path)).build(); } private com.datastax.oss.driver.api.core.CqlSessionBuilder standardCqlSessionBuilder() { return CqlSession.builder() .withKeyspace(keyspaceName) .addTypeCodecs( ExtraTypeCodecs.json(Rule.class, mapper), ExtraTypeCodecs.json(SegmentEntity.class, mapper), ExtraTypeCodecs.json(SegmentType.class, mapper), new EnumNameCodec<>(FilterType.class)) .withAuthCredentials(username, password); } Cluster.builder .withClusterName(s"${system.name}-${SecureBundleConfigSessionProvider.clusterIdentifier.getAndIncrement()}") .withCloudSecureConnectBundle(secureConnectBundle) .withPoolingOptions(poolingOptions) .withReconnectionPolicy(new ExponentialReconnectionPolicy(1000, reconnectMaxDelay.toMillis)) .withQueryOptions(new QueryOptions().setFetchSize(fetchSize)) .withLoadBalancingPolicy(new TokenAwarePolicy(DCAwareRoundRobinPolicy.builder.withLocalDc(localDatacenter) .withUsedHostsPerRemoteDc(usedHostsPerRemoteDc) .build()))

Environment

None

Pull Requests

None

Activity

Show:
Bret McGuire
updated the Affects versions
January 13, 2025 at 9:28 PM
3.12.0
None
Jeff DiNoto
changed the Status
February 15, 2022 at 3:35 PM
To-Do
Selected for Development
Jeff DiNoto
updated the Description
February 15, 2022 at 3:35 PM
None
Driver should automatically pick up contact points when Stargate is introduced to a cluster. Without this automatic resolution, the client application must be restarted resulting in downtime. Driver being used is 3.10.2. Here are some examples of code being used to access the cluster: {code:java}session = CqlSession.builder() .withCloudSecureConnectBundle(Paths.get(bundle)) .withAuthCredentials(username, password) .withKeyspace(keyspace) .build(); private CqlSession createCloudCqlSession() { return standardCqlSessionBuilder() .withCloudSecureConnectBundle(Paths.get(path)).build(); } private com.datastax.oss.driver.api.core.CqlSessionBuilder standardCqlSessionBuilder() { return CqlSession.builder() .withKeyspace(keyspaceName) .addTypeCodecs( ExtraTypeCodecs.json(Rule.class, mapper), ExtraTypeCodecs.json(SegmentEntity.class, mapper), ExtraTypeCodecs.json(SegmentType.class, mapper), new EnumNameCodec<>(FilterType.class)) .withAuthCredentials(username, password); } Cluster.builder .withClusterName(s"${system.name}-${SecureBundleConfigSessionProvider.clusterIdentifier.getAndIncrement()}") .withCloudSecureConnectBundle(secureConnectBundle) .withPoolingOptions(poolingOptions) .withReconnectionPolicy(new ExponentialReconnectionPolicy(1000, reconnectMaxDelay.toMillis)) .withQueryOptions(new QueryOptions().setFetchSize(fetchSize)) .withLoadBalancingPolicy(new TokenAwarePolicy(DCAwareRoundRobinPolicy.builder.withLocalDc(localDatacenter) .withUsedHostsPerRemoteDc(usedHostsPerRemoteDc) .build())){code}
Jeff DiNoto
created the Work item
February 15, 2022 at 3:34 PM

Details

Assignee

Reporter

Affects versions

Priority

Created February 15, 2022 at 3:34 PM
Updated January 13, 2025 at 9:28 PM

Flag notifications