Open mcollina opened 10 years ago
Hi, First of all thanks for such a wonderful initiative. Well I have been using your broker to work with mqtt based client like android etc.Now I want to use it for web-browser. As,it requires a websocket client so in mosca i have found a client server code which uses mows.js to connect to any websocket server.
Now if that is the case then I need to run a seperate websocket server and a seperate Mqtt broker to cater android and web browser client. My question is : Is there a way in which we can run just one mqtt broker which caters to both mqtt and websocket.
I would appreciate if some one can give some pointers in this regards.
Thanks
You can have Mosca listen on multiple ports, or you can attach Mosca to your own HTTP server. The test server at test.mosca.io is working in both modes.
Thanks a lot that helped.Appreciate it.
Old issue but, what do you meant initially with "add a web client"? you mean a client with a cool UI?
Yes, something to publish and subscribe to the broker and do general debugging.
Hmm I could work on that, should it have a basic UI or we're looking for something cool to see? material design etc..
If you are into polymer, you can try https://github.com/mqttjs/mqtt-elements.
Basic UI, and you can also leverage from mqttlens (https://github.com/sandro-k/MQTTLensChromeApp) by @sandro-k.
Anyway, any help is very welcomed!
(or something react-based is fine too!)
I am trying to find some time to update MQTTLens to the mqtt-elemets and polymer 1.0. Maybe that can help you.
I have used mqtt for web client but i hve this error message: failed: Error during WebSocket handshake: Unexpected response code: 200 !!!!!
@YasserTahri Please open up a new issue and explain your problem in more depth there.
We can include the code in https://github.com/hivemq/hivemq-mqtt-web-client, it's apache licensed.