kartikk221 / hyper-express

High performance Node.js webserver with a simple-to-use API powered by uWebsockets.js under the hood.
MIT License
1.68k stars 87 forks source link

Specify QoS for MQTT syntax #275

Closed SebastienGllmt closed 3 months ago

SebastienGllmt commented 3 months ago

In the websocket docs, it mentions MQTT syntax being accepted for subscriptions. However, it mentions nothing about how this MQTT support is implemented internally. This matters because MQTT defines 3 QoS levels that have different implications for how clients should be written

It's also possible that by MQTT syntax you mean you're just using the MQTT syntax and now actually following the protocol at all, but even in this case it would be nice if this was explicitly mentioned and possibly what QoS level the implementation maps to

kartikk221 commented 3 months ago

Hi, I am not exactly sure about that myself since we simply wrap around uWebsockets.js and uWS states in its code and docs that it supports MQTT rules and syntax. https://github.com/uNetworking/uWebSockets/blob/01058d90e9d092c2d6551956d7e0785e0e94ff21/src/WebSocket.h#L263-L285 You would have to follow up on this within the uWS repository as your topic string is fed directly to uWS.

SebastienGllmt commented 3 months ago

I got an answer from the uWebSockets team: https://github.com/uNetworking/uWebSockets/issues/1753