apache / rocketmq-mqtt

Apache rocketmq
https://rocketmq.apache.org/
Apache License 2.0
183 stars 65 forks source link

Session Present Flag is not respected #281

Open lizhanhui opened 5 months ago

lizhanhui commented 5 months ago

MQTT protocol defines Session Present Flag as follows:

image

ConnectHandler writes ConnAck having session-present=false constantly:

See: https://github.com/apache/rocketmq-mqtt/blob/477d478316f95c24bfec0da7f80217dd7d605073/mqtt-cs/src/main/java/org/apache/rocketmq/mqtt/cs/protocol/mqtt/handler/MqttConnectHandler.java#L109

https://github.com/apache/rocketmq-mqtt/blob/477d478316f95c24bfec0da7f80217dd7d605073/mqtt-cs/src/main/java/org/apache/rocketmq/mqtt/cs/protocol/mqtt/facotry/MqttMessageFactory.java#L42

DongyuanPan commented 5 months ago

Yes, currently there's no storage for subscription relationships, meaning it doesn't support cleansession=false. Therefore, the default setting is false