rabbitmq-server
rabbitmq-server copied to clipboard
Last Will message sent on graceful client disconnect if connected through MQTT WebSocket
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!
Please share some code that can be used to reproduce.
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!