chore: make spellcheck happy
This commit is contained in:
parent
0c27613ce4
commit
d6a9072bb0
|
@ -4,11 +4,11 @@ emqx_modules_schema {
|
|||
desc {
|
||||
en: """The topic rewriting function of EMQX supports rewriting topic A to topic B when the client subscribes to topics, publishes messages, and cancels subscriptions according to user-configured rules.
|
||||
Each rewrite rule consists of three parts: subject filter, regular expression, and target expression.
|
||||
Under the premise that the subject rewriting function is enabled, when EMQX receives a subject-based MQTT message such as a PUBLISH message,
|
||||
Under the premise that the subject rewriting function is enabled, when EMQX receives a subject-based MQTT message such as a `PUBLISH` message,
|
||||
it will use the subject of the message to sequentially match the subject filter part of the rule in the configuration file. If the match is successful,
|
||||
the regular expression is used to extract the information in the subject, and then replaced with the target expression to form a new subject.
|
||||
Variables in the format of $N can be used in the target expression to match the elements extracted from the regular expression.
|
||||
The value of $N is the Nth element extracted from the regular expression. For example, $1 is the regular expression. The first element extracted by the expression.
|
||||
Variables in the format of `$N` can be used in the target expression to match the elements extracted from the regular expression.
|
||||
The value of `$N` is the Nth element extracted from the regular expression. For example, $1 is the regular expression. The first element extracted by the expression.
|
||||
It should be noted that EMQX uses reverse order to read the rewrite rules in the configuration file.
|
||||
When a topic can match the topic filter of multiple topic rewrite rules at the same time, EMQX will only use the first rule it matches. Rewrite.
|
||||
If the regular expression in this rule does not match the subject of the MQTT message, the rewriting will fail, and no other rules will be attempted for rewriting.
|
||||
|
@ -17,7 +17,7 @@ Therefore, users need to carefully design MQTT message topics and topic rewritin
|
|||
重写规则分为 Pub 规则和 Sub 规则,Pub 规则匹配 PUSHLISH 报文携带的主题,Sub 规则匹配 SUBSCRIBE、UNSUBSCRIBE 报文携带的主题。
|
||||
每条重写规则都由主题过滤器、正则表达式、目标表达式三部分组成。
|
||||
在主题重写功能开启的前提下,EMQX 在收到诸如 PUBLISH 报文等带有主题的 MQTT 报文时,将使用报文中的主题去依次匹配配置文件中规则的主题过滤器部分,一旦成功匹配,则使用正则表达式提取主题中的信息,然后替换至目标表达式以构成新的主题。
|
||||
目标表达式中可以使用 $N 这种格式的变量匹配正则表达中提取出来的元素,$N 的值为正则表达式中提取出来的第 N 个元素,比如 $1 即为正则表达式提取的第一个元素。
|
||||
目标表达式中可以使用 `$N` 这种格式的变量匹配正则表达中提取出来的元素,`$N` 的值为正则表达式中提取出来的第 N 个元素,比如 $1 即为正则表达式提取的第一个元素。
|
||||
需要注意的是,EMQX 使用倒序读取配置文件中的重写规则,当一条主题可以同时匹配多条主题重写规则的主题过滤器时,EMQX 仅会使用它匹配到的第一条规则进行重写,如果该条规则中的正则表达式与 MQTT 报文主题不匹配,则重写失败,不会再尝试使用其他的规则进行重写。
|
||||
因此用户在使用时需要谨慎的设计 MQTT 报文主题以及主题重写规则。"""
|
||||
}
|
||||
|
@ -40,12 +40,15 @@ Therefore, users need to carefully design MQTT message topics and topic rewritin
|
|||
|
||||
tr_action {
|
||||
desc {
|
||||
en: """subscribe: Rewrite topic when client do subscribe.
|
||||
publish: Rewrite topic when client do publish.
|
||||
all: Both"""
|
||||
zh: """subscribe:订阅时重写主题;
|
||||
publish:发布时重写主题;
|
||||
all:全部重写主题"""
|
||||
en: """Topic rewriting takes effect on the type of operation:
|
||||
- `subscribe`: Rewrite topic when client do subscribe.
|
||||
- `publish`: Rewrite topic when client do publish.
|
||||
- `all`: Both"""
|
||||
|
||||
zh: """主题重写在哪种操作上生效:
|
||||
- `subscribe`:订阅时重写主题;
|
||||
- `publish`:发布时重写主题;
|
||||
-`all`:全部重写主题"""
|
||||
}
|
||||
label {
|
||||
en: """Action"""
|
||||
|
|
|
@ -16,7 +16,7 @@ emqx_retainer_schema {
|
|||
|
||||
flow_control {
|
||||
desc {
|
||||
en: "flow control."
|
||||
en: "Flow control."
|
||||
zh: "流控设置"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue