// publisher using `callbackName` to subscribe consumer result
@@ -47,28 +49,28 @@ public object DeductProductQty(JToken param)
}
```
## 异构系统集成
## Heterogeneous system integration
在 3.0+ 版本中,我们对消息结构进行了重构,我们利用了消息队列中消息协议中的 Header 来传输一些额外信息,以便于在 Body 中我们可以做到不需要修改或包装使用者的原始消息数据格式和内容进行发送。
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.
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.
现在我们将消息划分为 Header 和 Body 来进行传输。
Now we divide the message into Header and Body for transmission.
Body 中的数据为用户发送的原始消息内容,也就是调用 Publish 方法发送的内容,我们不进行任何包装仅仅是序列化后传递到消息队列。
The data in the body is the content of the original message sent by the user, that is, the content sent by calling the Publish method. We do not perform any packaging, but send it to the message queue after serialization.
在 Header 中,我们需要传递一些额外信息以便于CAP在收到消息时能够提取到关键特征进行操作。
In the Header, we need to pass some additional information so that the CAP can extract the key features for operation when the message is received.
以下是在异构系统中,需要在发消息的时候向消息的Header 中写入的内容:
The following is the content that needs to be written into the header of the message when sending a message in a heterogeneous system:
@@ -50,28 +50,28 @@ public object DeductProductQty(JToken param)
}
```
## Heterogeneous system integration
## 异构系统集成
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.
在 3.0+ 版本中,我们对消息结构进行了重构,我们利用了消息队列中消息协议中的 Header 来传输一些额外信息,以便于在 Body 中我们可以做到不需要修改或包装使用者的原始消息数据格式和内容进行发送。
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.
Now we divide the message into Header and Body for transmission.
现在我们将消息划分为 Header 和 Body 来进行传输。
The data in the body is the content of the original message sent by the user, that is, the content sent by calling the Publish method. We do not perform any packaging, but send it to the message queue after serialization.
Body 中的数据为用户发送的原始消息内容,也就是调用 Publish 方法发送的内容,我们不进行任何包装仅仅是序列化后传递到消息队列。
In the Header, we need to pass some additional information so that the CAP can extract the key features for operation when the message is received.
在 Header 中,我们需要传递一些额外信息以便于CAP在收到消息时能够提取到关键特征进行操作。
The following is the content that needs to be written into the header of the message when sending a message in a heterogeneous system:
以下是在异构系统中,需要在发消息的时候向消息的Header 中写入的内容:
Key | DataType | Description
键 | 类型 | 说明
-- | --| --
cap-msg-id | string | Message Id, Generated by snowflake algorithm, can also be guid
cap-msg-name | string | The name of the message
cap-msg-type | string | The type of message, `typeof(T).FullName`(not required)
cap-senttime | string | sending time (not required)