Skip to content

Commit 63b091c

Browse files
committed
Update docs.
1 parent f077529 commit 63b091c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

docs/content/user-guide/zh/cap/configuration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ services.AddCap(config =>
8383
在消息消费的过程中,如果消费失败,CAP将会对消息进行重试消费,此配置项用来配置每次重试的间隔时间。
8484

8585
!!! WARNING "重试 & 间隔"
86-
在默认情况下,重试将在发送和消费消息失败的 **4分钟后** 开始,这是为了避免设置消息状态延迟导致可能出现的问题。
86+
在默认情况下,重试将在发送和消费消息失败的 **FallbackWindowLookbackSeconds(4分钟后** 开始,这是为了避免设置消息状态延迟导致可能出现的问题。
8787
发送和消费消息的过程中失败会立即重试 3 次,在 3 次以后将进入重试轮询,此时 FailedRetryInterval 配置才会生效。
8888

8989
!!! WARNING "多实例并发重试"

docs/content/user-guide/zh/cap/filter.md

+4
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,7 @@ services.AddCap(opt =>
5151
```
5252

5353
目前, 我们还不支持同时添加多个过滤器。
54+
55+
!!! WARNING "过滤器中使用 AsyncLocal 的问题"
56+
我们不建议在过滤器中使用AsyncLocal,因为过滤器的生命周期为Scoped,所以直接定义临时变量即可在整个执行周期内共享变量值。
57+
然后,如果由于一些你无法控制的原因要使用,由于AsyncLocal的设计问题,则可将异步过滤器作为同步使用,也就是继承的方法构造中不添加 async 关键字。

0 commit comments

Comments
 (0)