Address ENG-8256.
Added a special AMQP message, that when received by consumer for given device ID, the websocket session is closed.
Differential D13227
[tunnelbroker] Close WS session when received special AMQP message bartek on Sep 2 2024, 11:46 PM. Authored by Tags None Referenced Files
Details Address ENG-8256. Added a special AMQP message, that when received by consumer for given device ID, the websocket session is closed. Modified SendMessageToDevice to send this message instead. Confirmed that the device is disconnected.
Diff Detail
Event TimelineComment Actions I also considered using an enum enum AMQPMessage { MessageToDevice(MessageToDevice), SessionClose } but again I had weird issues with serde when trying to make it backwards compatible with existing format. For now I sticked to simple "special message" constant. Comment Actions One note: This is safe because of serialization here and the malicious device will not be able to close other devices sessions. |