Skip to content

Commit

Permalink
Update docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
yang-xiaodong committed Mar 19, 2024
1 parent f077529 commit 63b091c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/content/user-guide/zh/cap/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ services.AddCap(config =>
在消息消费的过程中,如果消费失败,CAP将会对消息进行重试消费,此配置项用来配置每次重试的间隔时间。

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

!!! WARNING "多实例并发重试"
Expand Down
4 changes: 4 additions & 0 deletions docs/content/user-guide/zh/cap/filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ services.AddCap(opt =>
```

目前, 我们还不支持同时添加多个过滤器。

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

0 comments on commit 63b091c

Please sign in to comment.