Skip to content

Commit

Permalink
fix(mqtt): adapt keepalive_check_interval
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinplemelon authored and ysfscream committed Jul 9, 2024
1 parent d2a31a0 commit e7f4df2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/schemaText/schema-text-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,10 @@
"client_attrs_init_expression": {
"label": "Attribute Expression",
"desc": "A single-line expression that dynamically extracts attribute values from existing client information can use the following fields:<br/><br/>- `clientid`: client ID<br/>- `username`: user name<br/>- `cn`: CN field of TLS certificate<br/>- `dn`: DN field of TLS certificate<br/>- `user_property.*`: extracts the property value from the `User-Property` of the MQTT CONNECT packet, e.g. `user_property.foo`<br/><br/>You can use predefined string functions to dynamically process the information. For example, to extract the prefix of a dot-separated client ID: `nth(1, tokens(clientid, '.'))`; to extract a partial username: `substr(username, 0, 5)`. You can read more about variform expressions in EMQX docs.<br/>"
},
"mqtt_keepalive_check_interval": {
"label": "Keep Alive Check Interval",
"desc": "The frequency of checking for incoming MQTT packets determines how often the server will check for new MQTT packets.<br />If a certain amount of time passes without any packets being sent from the client, this time will be added up.<br />Once the accumulated time exceeds `keepalive-interval * keepalive-multiplier`, the connection will be terminated.<br />The default is set to 30 seconds, with a minimum value of 1 second and a maximum value of `keepalive-interval / 2`.<br />"
}
}
}
4 changes: 4 additions & 0 deletions src/schemaText/schema-text-zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -1357,6 +1357,10 @@
"client_attrs_init_expression": {
"label": "属性表达式",
"desc": "一个行表达式,用于从客户端现有信息中动态提取属性值,可以使用以下字段:<br/><br/>- `clientid`:客户端 ID<br/>- `username`:用户名<br/>- `cn`:TLS 证书的 CN 字段<br/>- `dn`:TLS 证书的 DN 字段<br/>- `user_property.*`:从 MQTT CONNECT 数据包的 `User-Property` 中提取属性值,例如 `user_property.foo`<br/><br/>支持使用预定义的字符串函数对信息进行动态处理。例如,要提取由点分隔的客户端 ID 的前缀:`nth(1, tokens(clientid, '.'))`;要截取用户名部分信息:`substr(username, 0, 5)`。您可以在 EMQX 文档中了解有关 variform 表达式的更多信息。<br/>"
},
"mqtt_keepalive_check_interval": {
"label": "保活检查间隔",
"desc": "检查传入 MQTT 数据包的频率决定了服务器检查新 MQTT 数据包的频率。<br />如果客户端在一定时间内没有发送任何数据包,这段时间将会累积。<br />一旦累积时间超过 `keepalive-interval * keepalive-multiplier`,连接将会被终止。<br />默认值设置为 30 秒,最小值为 1 秒,最大值为 `keepalive-interval / 2`。"
}
}
}

0 comments on commit e7f4df2

Please sign in to comment.