bytebeamio / rumqtt

The MQTT ecosystem in rust
Apache License 2.0
1.65k stars 255 forks source link

rumqttc: disconnect with options #887

Open xiaocq2001 opened 4 months ago

xiaocq2001 commented 4 months ago

Expected Behavior

It does not appear there is a way to inform the broker that the client wishes to end the session. Usually, as I understand it, this is done by sending a disconnect packet with an expiry interval set to 0, but this is not currently an option on rumqttc’s disconnect.

Current Behavior

There is no way to assign disconnect options.

swanandx commented 4 months ago

Thanks for pointing it out! We should have a method like disconnect_with_properties for disconnect in v5 client ( just like we have for publish/subscribe )