Description
Connect.allowedProtocolVersion compares equality to MqttVersion.MQTT_3_1.protocolLevel() (level 3) only. Level 4 (MQTT 3.1.1) and level 5 (MQTT 5.0) are refused with CONNECTION_REFUSED_UNACCEPTABLE_PROTOCOL_VERSION. MQTT 3.1.1 has been the standard since 2014, so virtually every modern MQTT client (which defaults to 3.1.1) is rejected; the broker is effectively unusable for standard clients.
Location
shenyu-protocol/shenyu-protocol-mqtt/src/main/java/org/apache/shenyu/protocol/mqtt/Connect.java:91
Impact
Virtually all modern MQTT clients rejected at CONNECT; broker only accepts legacy 3.1.
Suggested fix
Accept MqttVersion.MQTT_3_1_1.protocolLevel() (and consider 5.0).
Related existing
Distinct from MQTT-01 (#6637, missing return after protocol-version rejection). (Secondary: the missing return at Connect:56-57 after rejection is already tracked by MQTT-01.)
Description
Connect.allowedProtocolVersioncompares equality toMqttVersion.MQTT_3_1.protocolLevel()(level 3) only. Level 4 (MQTT 3.1.1) and level 5 (MQTT 5.0) are refused withCONNECTION_REFUSED_UNACCEPTABLE_PROTOCOL_VERSION. MQTT 3.1.1 has been the standard since 2014, so virtually every modern MQTT client (which defaults to 3.1.1) is rejected; the broker is effectively unusable for standard clients.Location
shenyu-protocol/shenyu-protocol-mqtt/src/main/java/org/apache/shenyu/protocol/mqtt/Connect.java:91Impact
Virtually all modern MQTT clients rejected at CONNECT; broker only accepts legacy 3.1.
Suggested fix
Accept
MqttVersion.MQTT_3_1_1.protocolLevel()(and consider 5.0).Related existing
Distinct from MQTT-01 (#6637, missing
returnafter protocol-version rejection). (Secondary: the missingreturnatConnect:56-57after rejection is already tracked by MQTT-01.)