Add Multiple Read Replica Endpoints to a Gremlin Java Connection Pool - Amazon Neptune

Add Multiple Read Replica Endpoints to a Gremlin Java Connection Pool

When creating a Gremlin Java Cluster object, you can use the .addContactPoint() method to add multiple read replica instances to the connection pool's contact points.

Cluster.Builder readerBuilder = Cluster.build() .port(8182) .minConnectionPoolSize(…) .maxConnectionPoolSize(…) ……… .addContactPoint("reader-endpoint-1") .addContactPoint("reader-endpoint-2")