rabbitmq-server icon indicating copy to clipboard operation
rabbitmq-server copied to clipboard

Last Will message sent on graceful client disconnect if connected through MQTT WebSocket

Open teebeelol opened this issue 3 years ago • 2 comments

Hi Team!

There seems to be an issue when a client is connected to RabbitMQ through MQTT WebSocket, if the client disconnects through a graceful disconnect manner, an LWT message is also sent. The message is also sent if client disconnects in an abnormal way, which is the expected behaviour. It seems like there is also a gen_server crash.

This issue seems like occurs only when the MQTT connection is through WebSocket interface, if it's through HTTP or TCP/IP, everything seems to work fine, LWT message is sent only on abnormal disconnects.

Attached the RabbitMQ logs for the scenario mentioned above (graceful disconnect through calling client.end()). rabbitmq_logs.zip

Thank you in advance!

teebeelol avatar Jan 28 '22 13:01 teebeelol

Please share some code that can be used to reproduce.

michaelklishin avatar Jan 28 '22 13:01 michaelklishin

Attached an already built test app, example code is in index.js, can be run with opening index.html, also added log file rabbitmq-log2.txt mqtt-issue-testapp-with-log.zip

Thank you!

teebeelol avatar Jan 28 '22 14:01 teebeelol