cientId最大长度是多少?

EMQX 各个版本的cientId最大长度是多少?

https://www.emqx.io/docs/zh/v5.5.0/hocon/#V-mqtt-S-mqtt-max_clientid_len

请参考配置手册。
仍在维护的主线版本为 v5.x
最新版 v5.5.0 中默认值为 65535 ,可配置为 23 ~ 65535

基于协议规范:

Each of these strings is prefixed with a Two Byte Integer length field that gives the number of bytes in a UTF-8 encoded string itself, as illustrated in Figure 1.1 Structure of UTF-8 Encoded Strings below. Consequently, the maximum size of a UTF-8 Encoded String is 65,535 bytes.

The Server MUST allow ClientID’s which are between 1 and 23 UTF-8 encoded bytes in length, and that contain only the characters
“0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ” [MQTT-3.1.3-5].
The Server MAY allow ClientID’s that contain more than 23 encoded bytes. The Server MAY allow ClientID’s that contain characters not included in the list given above.