Here you can easily test pushing data to browsers with Fanout. This page uses MQTT.js.
Initializing...
This page is subscribed to the test topic, and will display the results below:
Open this page in a separate window to see how pushing from either window will cause both windows to receive the message.
This page is using the following JavaScript to subscribe to events:
// token limited to read/write of "test" topic const token = "205124e8e4b1933e780226c95fb0bd0091965a03"; const client = mqtt.connect("wss://mqtt-poc.edgecompute.app/mqtt", { reconnectPeriod: 0, protocolVersion: 5, username: "", password: token }); client.on("connect", () => { client.subscribe("test", (err) => { if (!err) { console.log("subscribed"); } }); }); client.on("message", (topic, message) => { // message is Buffer $('#output').text(message.toString()); });