MQTT for Objo brings MQTT to Objo Studio, the lightweight messaging protocol behind IoT devices, home automation, sensors and industrial telemetry. Whether you're reading a temperature sensor, controlling a Shelly switch, talking to Home Assistant or feeding a dashboard, your Objo apps can now speak MQTT directly: MQTT 5 and 3.1.1, over TCP, TLS or WebSockets.
The API is modelled on libmosquitto, the client library of the Mosquitto broker, so it will feel familiar if you've used MQTT before. Every call returns at once, and events tell you what happened. For sequential code, every call also has an Async version you can Await.
Var client As New Madru.Mqtt.Client("my-sensor-app")
AddHandler client.Connected, AddressOf OnConnected # subscribe here
AddHandler client.MessageReceived, AddressOf OnMessage
client.Connect("test.mosquitto.org", 1883) # MQTT 5 by default
Public beta: everything unlocked until 31 December 2026
Forum members can test without limits until the end of the year. Register this key once at app start, before connecting, for example in the Opening event of your app or window:
If Not Madru.Mqtt.Licence.Register("Objo Forum Testers", "README.md has it") Then
System.ErrorPrint(Madru.Mqtt.Licence.Description)
End If
Without the key everything still works, but connections end after 10 minutes per app run. The included demo apps run like that, which is plenty for a first look.
I have tested it on macOS (Apple Silicon). Reports from Windows and Linux are especially welcome, as are bugs, questions and feature wishes: please post them in this thread.
Features
Protocols and connections
- MQTT 5.0 (the default) and MQTT 3.1.1
- Plain TCP, TLS (with server name indication and certificate validation, and client certificates if your broker needs them) and WebSockets (
ws:// and wss://)
- User name and password authentication
- Clear reason codes when a broker refuses a connection, a subscription or a message
Messaging
- Quality of service 0, 1 and 2: at most once, at least once, exactly once
- Retained messages
- Last will and testament, including the MQTT 5 will delay
- Persistent sessions, with MQTT 5 session expiry, so no message is lost while your app is offline
- Text and binary payloads; UTF-8 is handled correctly
MQTT 5 extras
- User properties, content type, response topic, correlation data, message expiry, payload format indicator and subscription identifiers
- Subscription options: no-local, retain-as-published, retain handling
- Shared subscriptions (
$share/group/topic) to spread the load across several clients
Reliability
- Automatic reconnect with linear or exponential back-off
- Messages published while disconnected are queued and sent in order after the reconnect
- A configurable limit on unacknowledged messages in flight, 20 by default as in libmosquitto
Built for real apps
- Stays responsive under heavy load: even subscribed to
# on a busy public broker, your window keeps reacting. Optional batched delivery lets you decide how much work the UI does, whatever the message rate.
- Topic helpers to match topics against filters and to validate topic names and filters
- A
Log event for diagnostics
- Works in Desktop, Console, Web (server-side) and Worker projects
- Built apps carry everything they need: nothing to install on your users' machines
Thoroughly tested
Every release is tested with:
- 53 automated checks of the API against a local Mosquitto broker, over TCP, WebSocket, TLS, secure WebSockeonnections
- 61 interoperability checks run from real Objo code against Mosquitto's own command-line tools, covering QoS 0/1/2 in both directions, MQTT 5 properties, last will, reconnects, persistent sessions and flow control
- the public test brokers of Mosquitto and EMQX, over TCP, TLS, WebSocket and secure WebSocket
Included
- The plugin package: import it once through Objo Studio's Plugin Library (File β Plugin Libraryβ¦ β Import Pny project.
- Two desktop demo apps, ready to run: connect, subscribe, publish with user properties, and watch messages and protocol events live. One builds its window in code; the other is the same app laid out in the Window Designer, with the control
handlers in each control's events. The demos' source code is MIT-licensed, so you're free to reuse it in your ow
- Complete documentation: the full API, reason codes, MQTT 5 features, high message rates, and a side-by-side comparison with libmosquitto.
After the beta
MQTT for Objo will be commercial software with a permanent licence per developer, including a period of updates. You will always be able to evaluate it for free first. Licence keys are checked offline, so your apps never contact a server and your users
need no activation, and you can distribute the apps you build royalty-free.
Requirements: Objo Studio 26.10.2 or later.
MQTT for Objo is built on the proven MQTTnet library (MIT License, Β© .NET Foundation and Contributors).