Node js Cassandra Driver语言 - 配置重试策略



我在 Node js 中使用 Cassandra 的 DataStax 驱动程序,我想配置重试策略我找不到示例,我在 Java 中找到了一些,但注意到 Node。

我遇到了这两个链接,但无法得出如何在 Node 中实现它。

http://docs.datastax.com/en/developer/nodejs-driver/3.2/features/tuning-policies/#retry-policy

请指教。

您可以在

ClientOptions中设置重试策略:

const client = new cassandra.Client({
  contactPoints: ['host1', 'host2'],
  policies: {
    retry: new YourRetryPolicy()
  }
});

最新更新