MQTT Broker Free

RosarIoT MQTT Broker  is a free service for R&D with Eclipse Mosquitto, an open source message broker that implements versions 5.0, 3.1.1 and 3.1 of the MQTT protocol.

Free without TLS

  • Broker: mqtt.rosariot.com
  • Puerto: 1800
  • Persistence: NO
  • Backups: NO

Free with TLS

  • Broker: mqtt.rosariot.com
  • Puerto: 8880
  • Certificate:  Download
  • Persistence: NO
  • Backups: NO

Broker MQTT Free TLS



MQTT.fx

Broker MQTT Free


Broker MQTT Free TLS



Broker MQTT Free


Broker MQTT Free TLS





#include <ESP8266Wifi.h>
#include <PubSubClient.h>
const char *ssid = "ssid-wifi";
const char *pass = "password-wifi";
WiFiClientSecure wifi_client;
const char* mqtt_server = "mqtt.rosariot.com";
const int mqtt_port = 8880;
const char* mqtt_fingerprint = "42:EF:11:A3:D2:3F:9C:43:8C:03:FC:B2:A1:21:13:73:AC:B1:77:26:1F:34:96:7D:DD:2A:CF:5B:A5:0E:86:F8";
//const char* mqtt_pass = "mqtt-user";
//const char* mqtt_user = "mqtt-pass";
PubSubClient mqtt_client(mqtt_server, mqtt_port, wifi_client);
void setup()
{
  Serial.begin(115200);
  delay(100);
  Serial.println("Connecting to ");
  Serial.println(ssid);
  WiFi.begin(ssid, pass);
  while (WiFi.status() != WL_CONNECTED) {
     delay(500);
     Serial.print(".");
 }
  Serial.println("");
  Serial.println("WiFi connected");
  wifi_client.setFingerprint(mqtt_fingerprint);
}
void loop()
{
  wifi_client.connect(mqtt_server,mqtt_port);    //CONNETION TCP/IP TO SERVER
  if(wifi_client.verify(mqtt_server,mqtt_fingerprint)) {    //VERIFICATION TLS
     Serial.println("SECURE TLS OK");
     wifi_client.stop();
     if(mqtt_client.connect(“mqtt_id”)) {    //CONNETION TO MQTT BROKER
     Serial.println("MQTTS OK");
//-----------------------YOUR CODE------------------------------//
     } else {
                wifi_client.stop();
             Serial.print(" --> ERROR WHEN TRYING CONNECT TO BROKER MQTT, "); Serial.print("rc= "); Serial.println(mqtt_client.state()); 
     }
  } else {
          wifi_client.stop();
       Serial.println(" --> ERROR SECURE TLS");
  }
  delay(5000);
}