【发布时间】:2022-08-15 03:56:33
【问题描述】:
我想将重试模式与 Aws DynamoDb 一起使用。我不知道我是否可以使用 nuget 的 Polly 包。我研究了很多,但我学会了如何实现 Polly,但我找不到如何将 Polly 与 DynamoDb 连接起来。
有什么方法可以将 Polly 重试策略与 Aws DynamoDb 一起使用?
我会给你一个示例代码块,我想知道如何用 DynamoDb 实现它
Policy
.WaitAndRetryAsync(
5,
retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)),
(exception, timeSpan, context) => {
// do something
}
);
我是 Aws Services 的新手,您能给我一些建议吗?
标签: c# amazon-web-services .net-core amazon-dynamodb polly