File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
docs/content/user-guide/zh/cap Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ services.AddCap(config =>
83
83
在消息消费的过程中,如果消费失败,CAP将会对消息进行重试消费,此配置项用来配置每次重试的间隔时间。
84
84
85
85
!!! WARNING "重试 & 间隔"
86
- 在默认情况下,重试将在发送和消费消息失败的 ** 4分钟后** 开始,这是为了避免设置消息状态延迟导致可能出现的问题。
86
+ 在默认情况下,重试将在发送和消费消息失败的 ** FallbackWindowLookbackSeconds( 4分钟后) ** 开始,这是为了避免设置消息状态延迟导致可能出现的问题。
87
87
发送和消费消息的过程中失败会立即重试 3 次,在 3 次以后将进入重试轮询,此时 FailedRetryInterval 配置才会生效。
88
88
89
89
!!! WARNING "多实例并发重试"
Original file line number Diff line number Diff line change @@ -51,3 +51,7 @@ services.AddCap(opt =>
51
51
```
52
52
53
53
目前, 我们还不支持同时添加多个过滤器。
54
+
55
+ !!! WARNING "过滤器中使用 AsyncLocal 的问题"
56
+ 我们不建议在过滤器中使用AsyncLocal,因为过滤器的生命周期为Scoped,所以直接定义临时变量即可在整个执行周期内共享变量值。
57
+ 然后,如果由于一些你无法控制的原因要使用,由于AsyncLocal的设计问题,则可将异步过滤器作为同步使用,也就是继承的方法构造中不添加 async 关键字。
You can’t perform that action at this time.
0 commit comments