Skip to content

SDK Integration

RobustMQ is fully compatible with MQTT 3.x / 5.0. Any standard community MQTT SDK works out of the box — no custom adapters needed.

Connection Details

ParameterValue
Hostlocalhost (local) or public server 117.72.92.117
Port1883 (TCP) / 8083 (WebSocket)
Usernameadmin
Passwordrobustmq

SDKs by Language

LanguageSDKInstall
Goeclipse/paho.mqtt.golanggo get github.com/eclipse/paho.mqtt.golang
Javaeclipse/paho.mqtt.javaMaven / Gradle
Pythoneclipse/paho-mqtt-pythonpip install paho-mqtt
JavaScriptMQTT.jsnpm install mqtt
Ceclipse/paho.mqtt.cBuild from source

Quick Example

The following Go snippet shows the minimal connect / publish / subscribe flow:

go
import mqtt "github.com/eclipse/paho.mqtt.golang"

opts := mqtt.NewClientOptions().
    AddBroker("tcp://localhost:1883").
    SetClientID("my-client").
    SetUsername("admin").
    SetPassword("robustmq")

client := mqtt.NewClient(opts)
client.Connect().Wait()

// Publish
client.Publish("test/topic", 0, false, "Hello RobustMQ!")

// Subscribe
client.Subscribe("test/topic", 0, func(_ mqtt.Client, msg mqtt.Message) {
    fmt.Println(string(msg.Payload()))
})

Full Documentation

For complete examples covering QoS, SSL/TLS, will messages, and more: