OptionalretryStrategy?: ClusterBatchRetryStrategy⚠️ Please see ClusterBatchRetryStrategy and read carefully before enabling these configurations.
Defines the retry strategy for handling batch request failures.
This strategy determines whether failed commands should be retried, potentially impacting execution order.
retryServerError is true, retriable errors (e.g., TRYAGAIN) will trigger a retry.retryConnectionError is true, connection failures will trigger a retry.⚠️ Warnings:
Note: Currently, retry strategies are supported only for non-atomic batches.
Recommendation: It is recommended to increase the timeout in BaseBatchOptions when enabling these strategies.
Default: Both retryServerError and retryConnectionError are set to false.
Optionalroute?: SingleNodeRouteConfigures single-node routing for the batch request. The client will send the batch to the
specified node defined by route.
If a redirection error occurs:
Options for a batch request for a cluster client.
Route
Configures single-node routing for the batch request. The client will send the batch to the specified node defined by
route.Retry Strategy
⚠️ Please read ClusterBatchRetryStrategy carefully before enabling these configurations. Defines the retry strategy for handling batch request failures.
This strategy determines whether failed commands should be retried, potentially impacting execution order.
retryServerErroristrue, retriable errors (e.g.,TRYAGAIN) will trigger a retry.retryConnectionErroristrue, connection failures will trigger a retry.⚠️ Warnings:
Note: Currently, retry strategies are supported only for non-atomic batches.
Recommendation: It is recommended to increase the timeout in BaseBatchOptions when enabling these strategies.
Default: Both
retryServerErrorandretryConnectionErrorare set tofalse.