shamblett / mqtt5_client

A server and browser based MQTT 5 client for dart
Other
49 stars 25 forks source link

Could not make the mqtt5_client connect to a EMQX server with WS #58

Closed RickyMckay closed 1 year ago

RickyMckay commented 1 year ago

I was only experimenting with this for fun (Ex IT developer who became a manager now retired and keeping my brain active with dart)

I tried initially to connect to a free EMQX cloud instance but no joy so I downloaded Mosquitto onto my PC and this worked. So now I downloaded EMQX and ran on my PC and again no Joy.

Just messing around and looking at the other language examples I modified the connection string to add /mqtt at the end i.e. 'ws://RJMC-Work/' becomes 'ws://RJMC-Work/mqtt' and bang this works.

shamblett commented 1 year ago

Yes some broker endpoints are constructed like this, it should be stated somewhere by the provider what the endpoints/ports are for any particular broker instance. I've had a few issues with users not being able to connect to EMQX brokers over web sockets, I'll bear this in mind.

RickyMckay commented 1 year ago

Just an FYI