ntex-rs / ntex-mqtt

MQTT Client/Server framework for v5 and v3.1.1 protocols

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for MQTT over websockets

ctron opened this issue · comments

I would be interested in MQTT over websockets. To my understanding, and I may be wrong here, one would "just" need to encapsulate MQTT packets in WebSocket frames.

From what I saw, ntex has support for WebSockets and brings plain MQTT already. So maybe, there is a simple way to implement this.

it is relatively easy to do. ntex.http.h1 has upgrade service, so you can start mqtt service from inside of it. I am in the middle of large refactoring, after this refactoring get landed, it will be even easier to use mqtt over ws

Awesome. I am happy to help. And I am in no hurry, as I won't do much MQTT stuff in the next weeks :)

added mqtt-ws-server and mqtt-ws-client examples. server example also support mqtt and mqtt over ws at the same time