Datastax Cassandra Driver Retry Policy Delay?

前端 未结 1 324
有刺的猬
有刺的猬 2021-01-19 16:31

I am using the Datastax Cassandra driver and have a RetryPolicy setup to retry when a host is unavailable. However, I have noticed that it retries as fast as it can. I wou

1条回答
  •  北海茫月
    2021-01-19 17:29

    You can implement your own retry policy by adding a delay. The simplest way is to pick the source code of the default retry and modify it yourself to implement an exponential delay for retry or something similar.

    For exponential delay, just look at the source code of http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/ExponentialReconnectionPolicy.html to see how it works

    0 讨论(0)
提交回复
热议问题