Hello Graham

 You can use the following code with the official Java driver:

 SocketOptions socketOptions = new SocketOptions();
 socketOptions.setKeepAlive(true);

 Cluster.builder().addContactPoints(contactPointsList)
                        .withPort(cql3Port)
                        .withCompression(ProtocolOptions.Compression.SNAPPY)
                        .withCredentials(cassandraUsername,
cassandraPassword)
                        .withSocketOptions(socketOptions)
                        .build();

 or :

 
alreadyBuiltClusterInstance.getConfiguration().getSocketOptions().setKeepAlive(true);


 Althought I'm not sure if the second alternative does work because the
cluster is already built and maybe the connection is already established...

 Regards

 Duy Hai DOAN


On Wed, Apr 9, 2014 at 12:59 AM, graham sanderson <gra...@vast.com> wrote:

> Is there a way to configure KEEPALIVE on the server end sockets of the
> binary protocol.
>
> rpc_keepalive only affects thrift.
>
> This is on 2.0.5
>
> Thanks,
>
> Graham

Reply via email to