MQTT Brokers

RosarIoT MQTT Brokers are servers 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. Allow to communicate Arduino and ESP8266 devices. The communication is authenticated in our brokers and encrypted under TLS v1.2.

Free

$ 0 .00

month
  • Devices: 2
  • Brokers MQTT: 1
  • Messages: Unlimited
  • Bandwidth: Unlimited
  • Help: NO
  • Backups: NO

R&D

$3 .99

month
  • Devices: Unlimited
  • Brokers MQTT: On demand
  • Messages: Unlimited
  • Bandwidth: Unlimited
  • Help: YES
  • Backups: YES
#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 = 18001;
const char* mqtt_fingerprint = "1F:5A:4C:2B:5F:8F:5D:7O:E9:AD:YC:2D:4C:00:A6:6F:B4:0A:84:B1";
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”,mqtt_user,mqtt_pass)) { 		//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); }