Skip to content

Commit bfc0bb3

Browse files
committed
Update docs
1 parent 4b8a3cb commit bfc0bb3

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# Configuration
22

3-
By default, you can specify configuration when you register CAP services into the DI container for ASP.NET Core project.
3+
By default, you can specify configurations when you register CAP services into the DI container for an ASP.NET Core project.
44

55
```c#
6-
services.AddCap(config=>
6+
services.AddCap(config=>
77
{
8-
// config.XXX
8+
// config.XXX
99
});
1010
```
11+
1112
`services` is `IServiceCollection` interface, which can be found in the `Microsoft.Extensions.DependencyInjection` package.
1213

1314
## What is minimum configuration required for CAP

docs/content/user-guide/en/cap/messaging.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
The data sent by using the `ICapPublisher` interface is called `Message`.
44

55
!!! WARNING "TimeoutException thrown in consumer using HTTPClient"
6-
By default, if the consumer throws an `OperationCanceledException` (including `TaskCanceledException`), we consider this to be normal user behavior and ignore the exception. If you use HTTPClient in the consumer method and configure the request timeout, due to the [design issue](https://github.com/dotnet/runtime/issues/21965) of HTTP Client, you may need to handle the exception separately and re-throw non `OperationCanceledException`, refer to #1368.
6+
By default, if the consumer throws an `OperationCanceledException` (including `TaskCanceledException`), it is considered normal user behavior, and the exception is ignored. However, if you use `HttpClient` in the consumer method and configure a request timeout, you may need to handle exceptions separately and re-throw non-`OperationCanceledException` exceptions due to a [design issue](https://github.com/dotnet/runtime/issues/21965) in `HttpClient`. Refer to issue #1368 for more details.
77

88
## Compensating transaction
99

1010
Wiki :
1111
[Compensating transaction](https://en.wikipedia.org/wiki/Compensating_transaction)
1212

13-
In some cases, consumers need to return the execution value to tell the publisher, so that the publisher can implement some compensation actions, usually we called message compensation.
13+
In some cases, consumers need to return an execution result to inform the publisher, enabling the publisher to perform compensation actions. This process is commonly referred to as message compensation.
1414

15-
Usually you can notify the upstream by republishing a new message in the consumer code. CAP provides a simple way to do this. You can specify `callbackName` parameter when publishing message, usually this only applies to point-to-point consumption. The following is an example.
15+
Typically, you can notify the upstream system by republishing a new message in the consumer code. CAP simplifies this process by allowing you to specify the `callbackName` parameter when publishing a message. This feature is generally applicable to point-to-point consumption. Below is an example.
1616

17-
For example, in an e-commerce application, the initial status of the order is pending, and the status is marked as succeeded when the product quantity is successfully deducted, otherwise it is failed.
17+
For instance, in an e-commerce application, the initial status of an order is "pending." The status is updated to "succeeded" when the product quantity is successfully deducted; otherwise, it is marked as "failed."
1818

1919
```C#
2020
// ============= Publisher =================
@@ -87,7 +87,7 @@ public object DeductProductQty(JsonElement param, [FromCap] CapHeader header)
8787

8888
In version 3.0+, we reconstructed the message structure. We used the Header in the message protocol in the message queue to transmit some additional information, so that we can do it in the Body without modifying or packaging the user’s original The message data format and content are sent.
8989

90-
This approach is reasonable. It helps to better integrate in heterogeneous systems. Compared with previous versions, users do not need to know the message structure used inside CAP to complete the integration work.
90+
This approach facilitates better integration with heterogeneous systems. Compared to previous versions, users no longer need to understand the internal message structure used by CAP to complete integration tasks.
9191

9292
Now we divide the message into Header and Body for transmission.
9393

@@ -149,7 +149,7 @@ CAP will store the message after receiving it. For more information on storage,
149149

150150
## Retry
151151

152-
Retrying plays an important role in the overall CAP architecture design, CAP retry messages that fail to send or fail to execute. There are several retry strategies used throughout the CAP design process.
152+
Retrying is a crucial aspect of the CAP architecture. CAP retries messages that fail to send or execute, employing several retry strategies throughout its design.
153153

154154
### Send retry
155155

0 commit comments

Comments
 (0)