This shows how to override the retry policies for bigquery_storage_v1::BigQueryWriteClient:
.
set<google::cloud::bigquery_storage_v1::
BigQueryWriteConnectionIdempotencyPolicyOption>(
CustomIdempotencyPolicy().clone())
BigQueryWriteRetryPolicyOption>(
BigQueryWriteLimitedErrorCountRetryPolicy(3)
.clone())
BigQueryWriteBackoffPolicyOption>(
std::chrono::milliseconds(200),
std::chrono::seconds(45),
2.0)
.clone());
auto connection =
connection,
.
set<google::cloud::bigquery_storage_v1::
BigQueryWriteRetryPolicyOption>(
.clone()));
Options & set(ValueTypeT< T > v)
BigQuery Write API.
Definition: bigquery_write_client.h:67
Definition: bigquery_read_client.h:32
std::shared_ptr< BigQueryWriteConnection > MakeBigQueryWriteConnection(Options options={})
A factory function to construct an object of type BigQueryWriteConnection.
::google::cloud::internal::LimitedTimeRetryPolicy< bigquery_storage_v1_internal::BigQueryWriteRetryTraits > BigQueryWriteLimitedTimeRetryPolicy
Definition: bigquery_write_connection.h:43
google::cloud::internal::ExponentialBackoffPolicy ExponentialBackoffPolicy
Assuming you have created a custom idempotency policy. Such as:
BigQueryWriteConnectionIdempotencyPolicy {
public:
~CustomIdempotencyPolicy() override = default;
std::unique_ptr<google::cloud::bigquery_storage_v1::
BigQueryWriteConnectionIdempotencyPolicy>
clone() const override {
return std::make_unique<CustomIdempotencyPolicy>(*this);
}
};