Try the shiftr.io
Experience Now

Connect to our public instance to quickly test
the system with your hardware or software.

mqtt://public:public@public.cloud.shiftr.io

Languages & Libraries

The MQTT and HTTP protocol are standards that are supported by all popular
programming languages. For most languages, multiple libraries are available.

Use the MQTT.js library with Node.js or in the browser to publish and subscribe using MQTT.

// require npm package
const mqtt = require("mqtt");

// declare client
const client = mqtt.connect("mqtt://public:public@public.cloud.shiftr.io", {
  clientId: "javascript",
});

// register "connect" callback
client.on("connect", function () {
  console.log("connected!");

  // subscribe to topic
  client.subscribe("hello");

  // publish message every second
  setInterval(function () {
    client.publish("hello", "world");
  }, 1000);
});

// register "message" callback
client.on("message", function (topic, message) {
  console.log(topic + ": " + message.toString());
});

For more information see the JavaScript manual in the documentation.

Ready to get started?

Deploy shiftr.io in the cloud for free today and scale up as needed later.