From fcef630c3941b728eea60590687148d9f840eec2 Mon Sep 17 00:00:00 2001 From: magichan Date: Mon, 19 Aug 2024 22:43:31 +0800 Subject: [PATCH] add chinese translation of eventbus.md --- .../current/architecture/edge/eventbus.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/architecture/edge/eventbus.md b/i18n/zh/docusaurus-plugin-content-docs/current/architecture/edge/eventbus.md index 052c45fd7c..392ea57ff7 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/architecture/edge/eventbus.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/architecture/edge/eventbus.md @@ -3,16 +3,22 @@ title: EventBus sidebar_position: 2 --- ## Overview +## 概述 Eventbus acts as an interface for sending/receiving messages on mqtt topics. +Eventbus 作为一个接口,用于在 MQTT 主题上发送/接收消息。 It supports 3 kinds of mode: +该模块支持3种模式: - internalMqttMode - externalMqttMode - bothMqttMode + ## Topic +## 主题(Topic) eventbus subscribes to the following topics: +EventBus 订阅以下 MQTT 主题: ``` - $hw/events/upload/# - SYS/dis/upload_records @@ -24,19 +30,29 @@ eventbus subscribes to the following topics: - $hw/event/device/+/twin/+ ``` Note: topic wildcards +注意:主题通配符 | wildcard | Description | |---|---| | # | It must be the last character in the topic, and matches the current tree and all subtrees. | | + | It matches exactly one item in the topic tree. | +| 通配符 | 描述 | +|---|---| +| # | 它必须是主题中的最后一个字符,匹配当前树和所有子树。 | +| + | 它在主题树中精确匹配一个项目。 | + ## Flow chart +## 流程图 ### **1. eventbus receives messages from external client** +### **1. eventbus 接收来自外部客户端的消息** ![eventbus sends messages from external client](/img/eventbus/eventbus-handleMsgFromClient.jpg) ### **2. eventbus sends response messages to external client** +### **2. eventbus 发送响应消息给外部客户端** ![eventbus sends response messages to external client](/img/eventbus/eventbus-handleResMsgToClient.jpg) The flow is almost the same in internal mode except the eventbus is as message broker itself. +在内部模式下,流程几乎相同,只是 eventbus 本身作为消息代理。