r/MQTT • • 1h ago

Are you using test.mosquitto.org as broker?

0 Upvotes

I was just playing around with MQTT-Explorer, a really nice MQTT browser, and tried it on test.mosquitto.org.

Boy was I surprised what topics were active on this publlc broker!

I am not sure if everyone using it is aware that ALL of their MQTT traffic is publicly visible. I have used it exactly once, as debugging help when I first set up my own broker.

Does anyone use it as main broker?


r/MQTT • • 1d ago

I created a new MQTT Client, do we really need another one?

Thumbnail
katmanmqtt.com
1 Upvotes

Did we really need another MQTT client?

Probably not. But I kept running into the same problems.

I worked as an IT/OT engineer on a production line where MQTT was the main protocol for sending commands and exchanging data. During commissioning, messages would go missing, requests wouldn’t get responses, and figuring out what had happened meant digging through logs or wishing we’d logged more in the first place.

Sending a message was easy. Understanding why nothing happened afterward was the frustrating part.

I created Katman MQTT Client for industrial IoT and automation and general purposes.

I’m open for any feedback…

Please give feedback :)


r/MQTT • • 1d ago

I turned on MQTT and wow, do I have questions...

Post image
1 Upvotes

Hi All, New Guy here.

I'm in Rhode Island and not finding nodes, so I turned on MQTT/Download on Meshtastic and wow everything popped up. I am aware that is not how it would work in a SHTF situation, but it's fun to play with.

I have questions though as I'm stumbling around, unable to find a decent online tutorial about how to actually use the Meshtastic software properly.

  1. Privacy issues with MQTT, my understanding is that it will allow people to have accurate location of my node, because it is using the router (when I am home), is this correct? or does it still use the location accuracy I set of around 1 mile?
  2. Many people that I wanted to chat with in distant locations were showing up for me, and when I went to leave a message, I could not, so I sent "exchange user info" which I think I am suppose to do in order to get the "key" to talk with them, and several people sent me strings of text like the one pictured. What do I do with it?

Sorry if I am missing something obvious, I'm not able to find satisfactory answers online so far.


r/MQTT • • 3d ago

TopicBench 1.5 - A FAST / EFFICIENT MQTT explorer and Simulator

Post image
12 Upvotes

Hey people, I continue to update Topic Bench both as I use it every day and as I've gotten feedback I've made a lot of enhancements to the user interface so that it's not only simpler to use and easier to use but looks better as well.

Lots of refinements here's the overall feature set now the open source version is the free version with all the core capabilities and there's a pro version for quite a bit more with simulation Spark plug B simulation and an MCP agent server so you can do a lot with it in automated testing from an agent to set up equipment simulations and other things.

https://github.com/unipsycho/topicbench

Here is its overall feature sets now.

TopicBench features

Free / OSS

  • Multi-broker MQTT client with saved connection profiles
  • MQTT 5 support
  • Live topic tree with fast search and filtering, including | OR filters
  • Sticky topics, pinned in Raw, Value or Graph view
  • Payload viewer with JSON formatting, find-in-payload, and a hex view
  • Payload history with a time scrubber to step back through earlier values
  • Live graphs, including combined multi-series graph boards you can pop out, with PNG export
  • Publisher with JSON validation, retain, QoS, Last Will, and a Recent history
  • Clear retained messages, for a single topic or a whole branch
  • Retain and QoS tags on messages, and per-topic message rates
  • Live traffic view and throughput statistics
  • Sparkplug B decoding
  • Connection diagnostics
  • Context menus on the tree and on profiles
  • Multiple UI themes and adjustable font size
  • Keyboard shortcuts throughout
  • Saved layout, panel sizes and session restore
  • Built-in update checker
  • Native Rust performance with large topic trees
  • Windows, Linux and AUR packages
  • Open source, MIT or Apache-2.0
  • Written 100% in Rust/egui, so its a tiny package and VERY efficient (mem/cpu).

Pro

  • Topic simulation, with:

    • signal generators
    • formula-based calculated channels
    • JSON import and export
  • Sparkplug B simulator
  • Scenarios: multi-step, multi-broker test sequences with waits, conditions, loops and concurrent groups
  • Record and play back traffic from CSV
  • Deep history store for scrubbing back through long histories
  • Bookmarks, with groups and quick jump
  • Color rules to highlight topics and values
  • Topic tree import with remapping, and export
  • Built-in MCP server, so AI tools such as Claude can configure, setup simulations and drive your MQTT sessions
  • Extra UI themes: Nord, Tokyo Night, Everforest, Latte, Gruvbox and Rose Pine

r/MQTT • • 7d ago

MQTT broker with TUI

Post image
6 Upvotes

As a side project alongside my main work on MQTT Control RS, I’ve built a standalone MQTT broker.

Key features

-Runs as a background daemon

-Terminal UI (TUI) — because we all love the console, and it’s built right in

-Multi-threaded architecture

-Localized into 6 languages, crafted with care for the user

-Built-in in-app help

-Written in Rust with minimal resource footprint

-Ready-to-use installer packages for major OSes

Feel free to download and give it a try!

https://mqtt-control-rs.pages.dev/en/localbro/


r/MQTT • • 9d ago

XMQ MQTT broker reached version 1.2.

1 Upvotes

XMQ is an open-source MQTT broker written in C++, with a web configuration UI, a native permissions model, and extensions for authentication and data export. This is what it can do today.

Data integrations

  • Named integrations. message_export for MQTT messages and log_export for broker log records can each be configured several times in one broker. Every settings set has its own name, filters, destination, delivery queue and durable queue identity, so renaming one never breaks its queue. The Extensions screen lists the integrations and offers an Add Data Integration dialog.
  • Destinations. An integration can deliver to a database (db_sink), an HTTP endpoint (http_sink) or Kafka (kafka_sink). Persistent delivery uses a per-integration SQLite queue, retries with capped backoff, and an optional dead-letter topic for records that never make it out.
  • Kafka into MQTT too. The standalone kafka_source extension subscribes to Kafka topics and publishes the records as MQTT messages, verifying the Kafka broker's certificate and hostname over TLS.
  • SQL rules. An integration can select a topic filter, a typed predicate and JSON output fields with sql_rule; the rule is evaluated in the extension worker, without adding a database lookup to message delivery.
  • Validation before delivery. xmq_publish_schemas.json maps topic filters to Draft 2020-12 JSON Schema files. Matching publications are checked before they are delivered and invalid ones are rejected.

Authentication and permissions

  • Several ways to identify clients. Alongside SQL-backed accounts, the broker supports JWTs verified locally against a configured key or JWKS endpoint (including key rotation and group claims), an HTTP service that answers allow/deny with optional group names, and LDAP or Active Directory with StartTLS/LDAPS, nested AD groups and disabled-account checks.
  • Certificate-bound identities. An SSL key can require the MQTT username to match a certificate field and check client CRLs at CONNECT. Existing password and extension authentication, and native topic permissions, still apply.
  • Permissions stay native. Topic access is managed in User Management with the broker's own rules. The separate ACL editor is gone, and returned directory groups are mapped onto those same native rules.

Connectivity

  • MQTT in the browser. MQTT+WS and MQTT+WSS listeners sit alongside TCP and TLS, handling the HTTP upgrade, the mqtt subprotocol and WebSocket ping/pong and close frames.
  • Bridge topic mapping. local_prefix and remote_prefix map topic namespaces in both directions; bridges configured without them keep their existing topic names.

Observability and operations

  • Metrics and probes. A Prometheus endpoint serves /metrics, plus /healthz for liveness and /readyz for whether MQTT can serve clients. HTTP Basic auth is optional and the endpoint is off by default.
  • Logs you can query. logging.format=json writes one JSON object per line with timestamp, level, node, subject, component and message. A Docker stack with Prometheus, Loki, Grafana, provisioned dashboards and alerts is included.
  • Metrics over MQTT. $SYS/broker/system/cpu/percent and $SYS/broker/system/memory/rss_bytes expose the broker process's own CPU and memory, read by the same sampler that fills the Prometheus gauges.
  • Failures are visible. Storage backpressure and cluster connectivity are on the metrics endpoint. A broker now refuses to start if another process already holds one of its listener ports, instead of silently splitting clients with it.

Configuration and extensions

  • Declarative extension forms describe sections, conditional fields and presets without scripts; settings can declare a format that both the UI and the broker enforce.
  • The Extensions page lists installed extensions whether or not they are configured, including stopped ones with the version and description they report.
  • Configuration is split into three pages with two independent switches: one loads an extension, the other persists its settings. Required extensions cannot be disabled.

Durability

Experimental ack-after-store makes publish acknowledgements wait for the local AOF fsync when persistence is enabled, so a successful ack means the message is on disk. Storage errors withhold success. The broker tells clients its storage mode in CONNACK, and the load generator writes acknowledgements one at a time when it sees a durable broker.

Performance

We re-ran the same bench set with the same client and configuration as the previous release and found no regression: point-to-point measured 234 µs, against 242 µs before. An earlier apparent regression turned out to be an unoptimised load-test client, not the broker.

Worth knowing

  • Custom extensions built for an older release need to be rebuilt for the version you install.
  • JWT, HTTP auth and LDAP are explicitly experimental; their settings and cache behaviour may still change.

Links: source and issues, documentation, downloads and changelog.

Happy to answer questions about any of the above — especially the auth extensions and data integrations.


r/MQTT • • 12d ago

Zigbee2MQTT and the ZMR4 switch...

Thumbnail
reddit.com
1 Upvotes

r/MQTT • • 13d ago

How do you handle device identity and connection management in IoT systems?

5 Upvotes

I've been thinking about how to handle device identity in IoT systems using mTLS.

My current idea is to put the device ID in the certificate's CN and use the same ID as the MQTT Client ID.

The broker can then verify both identities and apply device-specific access rules.

The goal is to make sure one device cannot connect using another device's identity and to allow only one active connection per device.

I'm curious how others approach this.

Is this a good approach, or is there a better way to handle device identity and connection management in IoT systems?


r/MQTT • • 14d ago

Learn MQTT with Visual Programming

7 Upvotes

I teach AI and IoT to students from different courses, with different backgrounds and levels of programming experience. I needed a way to teach AI, IoT, ROS and programming logic while keeping practical activities accessible to students who were still learning to code.

That need led me to develop SHAPE: a visual programming environment where students can build application logic with blocks, exchange IoT messages through MQTT, interact with ROS 2, and explore edge AI using locally running models through Ollama.

In this tutorial, we start with a small exercise: sending an MQTT message from a browser-based client to SHAPE, without a physical sensor.

Why another visual programming environment?

If you already use Node-RED, visual MQTT messaging will be familiar. Node-RED lets you connect nodes into flows; SHAPE uses Blockly-based programming blocks to express application logic.

My reason for building SHAPE came from teaching mixed-level classes. I wanted students to explore programming logic, IoT, robotics and edge AI within the same environment.

This exercise gives you a starting point for trying that approach. It requires no physical sensor or AI model.

What you will build

The message follows this path:

MQTTX Web → public MQTT broker → SHAPE → Debug output

MQTTX Web acts as the publisher, standing in for an external device. SHAPE subscribes to a topic and executes its message-handling blocks when a message arrives.

The topic identifies the communication channel. The payload contains the message.

Before you begin

You need:

  • SHAPE installed and running.
  • An internet connection.
  • MQTTX Web open in another browser tab.

Follow the installation instructions in the SHAPE GitHub repository.

The documented Ubuntu configuration requires Ubuntu 24.04, Docker, a CPU with AVX/FMA support, 8 GB RAM and 32 GB storage.

No separate MQTT broker installation is needed for this exercise.

1. Connect MQTTX Web

Open MQTTX Web and create a connection with these settings:

SettingValue
NameSHAPE MQTT test
Protocolwss://
Hostbroker.emqx.io
Port8084
Path/mqtt
Client IDKeep the generated identifier

Connect and check that MQTTX reports a connected state.

This is a shared public broker. Use demonstration data only; do not send credentials, personal information or confidential data.

2. Configure SHAPE

Create a new Shape or edit an existing project.

In its MQTT configuration, enter:

SettingValue
Broker addressbroker.emqx.io
Port1883

Use the hostname without a protocol prefix, then save.

MQTTX Web uses secure WebSocket, while SHAPE uses MQTT over TCP. The different ports connect to the same broker.

3. Build the message handler

Open SHAPE’s visual editor and add the MQTT message reception block.

Configure its fields:

FieldValue
On message fromshape/input
get values inpayload

Inside the block’s do section, place a Debug block connected to the payload variable.

When a message arrives on shape/input, SHAPE executes the blocks inside do and displays the received content.

Save and run your Shape before publishing the test message.

4. Send your first message

Return to MQTTX Web.

Set the destination topic to:

shape/input

Choose JSON as the payload format and enter:

{
  "msg": "hello from MQTTX"
}

Click Publish.

Return to SHAPE and inspect the Debug output. You should see the received message, although the console formatting may differ from the JSON above.

You have now passed a message from an external application, through an MQTT broker, into your visual program.

5. Experiment with the connection

Change the payload and publish again:

{
  "msg": "my second MQTT message"
}

Check that the new content appears in SHAPE.

Next, change the publication topic in MQTTX to:

shape/another-input

Keep SHAPE subscribed to shape/input and publish again. That subscription will not receive the message sent to the different topic.

Now update SHAPE to subscribe to shape/another-input, save and restart the Shape, then repeat the test.

This demonstrates why publishers and subscribers must use matching topics.

For your own experiments, choose a distinctive topic name to reduce interference from other users of the public broker. Use the same name in both applications.

What this exercise teaches

A small messaging exercise introduces several concepts:

  • Publishers and subscribers: applications can exchange data without connecting directly to each other.
  • Broker: the intermediary distributes messages to matching subscribers.
  • Topics and payloads: the channel and the content serve different purposes.
  • Event-driven logic: an incoming message triggers the blocks inside the handler.

In a mixed-level classroom, these concepts provide a shared starting point. Students can observe message delivery before moving on to conditions, data processing and application actions.

MQTT is also one entry point into SHAPE. Other activities can explore ROS 2 communication or locally running AI models through Ollama, connecting messaging and programming logic to robotics and edge AI.

Troubleshooting

If the message does not appear, check the following:

CheckWhat to verify
BrokerBoth applications use broker.emqx.io
TopicBoth use exactly the same topic, including letter case
MQTTX connectionThe client is connected before publishing
SHAPE executionThe Shape is running before the message is sent
Debug blockIt is inside do and connected to payload
Saved changesThe running Shape includes your latest configuration

Try SHAPE

Get SHAPE and follow the installation instructions on GitHub.

If you try the exercise, share what you built and where you encountered difficulties. I am especially interested in feedback from educators working with students who have different levels of programming experience.

References


r/MQTT • • 15d ago

Ho trasformato un ESP32-S3 in un piccolo gateway di rete con backup 4G, recupero remoto NAS, Tailscale e Home Assistant.

1 Upvotes

r/MQTT • • 18d ago

Costruisci la tua prima logica applicativa MQTT con blocchi visivi in SHAPE

Thumbnail
reddit.com
3 Upvotes

r/MQTT • • 21d ago

Bridging ESP-NOW / lossy UDP nodes into Mosquitto when sensors sit in a bad Wi-Fi spot

4 Upvotes

Wanted to share a small first-mile bridge setup that fixed a headache I kept hitting with Mosquitto and outdoor ESP32 / ESP8266 sensor nodes.

Whenever a node sits at the edge of Wi-Fi coverage (around 15% to 30% packet loss), standard MQTT over TCP struggles badly. Even QoS 1 messages stall for 10 to 20 seconds when random RF fades trigger TCP retransmit backoff, and on battery or 80 KB SRAM boards keeping a TLS + TCP socket alive eats both power and heap.

Instead of replacing Mosquitto, I kept Mosquitto untouched on the Pi/server and put a small UDP / ESP-NOW transport (NLTP, MIT licensed) on just the noisy wireless hop between the field sensor and a local edge gateway:

  1. The sensor node (Arduino / PlatformIO library indian-aman/NLTP, ~4.8 KB static RAM in TX-only mode) compresses the JSON reading with LZ4, authenticates each packet with ChaCha20-Poly1305, and adds parity shards so the gateway can reconstruct up to ~35% dropped packets in flight without waiting on retransmits.
  2. A 25-line Python script on the gateway (using pynltp + paho-mqtt) listens on UDP, reassembles and verifies the JSON batch, and publishes clean topics like necklink/telemetry/node1 straight to localhost:1883 on Mosquitto. Urgent 1-packet alert frames get routed to necklink/alerts/reflex so they never wait behind a big log upload.

25-line Python -> MQTT bridge script (Gist):

https://gist.github.com/indian-aman/5a9ba38e85f7699fcd85e61212690040

Arduino / PlatformIO + Python source repo:

https://github.com/indian-aman/NLTP-Arduino

Curious how others here handle sensors in RF-noisy spots (metal sheds, basements, yards) before feeding data into Mosquitto or EMQX - do you mostly use MQTT-SN, LoRa2MQTT, or ESP-NOW gateways?


r/MQTT • • 22d ago

[Project] PLX: self-hosted Porsche Connect dashboard and MQTT integration — Docker & LoxBerry

Thumbnail
reddit.com
1 Upvotes

r/MQTT • • 24d ago

OpenMQTTGateway 1.9 released: ESP32 core 3.x, Theengs Decoder 2.5 with 25+ new BLE devices, security fixes

Thumbnail
reddit.com
1 Upvotes

r/MQTT • • 27d ago

Design feedback: bridging DMR radio commands to MQTT

2 Upvotes

I'm prototyping OMNI·ONE, a base station that uses DMR handhelds as an interface to local automation. An operator within radio coverage can send a request and get a radio reply without needing internet on the handheld. MQTT is one of the integrations I'm exploring for sensor queries and device commands.

Project demo: https://www.youtube.com/watch?v=LmXntpsCl5c

For the MQTT side, I'm considering a request ID and a short expiry, with no retained actuator commands. The base would reply 'confirmed' only after receiving a fresh device acknowledgment. What would you use to correlate replies and deduplicate retried commands when the broker or device reconnects?


r/MQTT • • Nov 04 '26

I built a connector to stream Sparkplug B payloads into Databricks

Thumbnail
linkedin.com
7 Upvotes

r/MQTT • • Nov 04 '26

I built an MQTT troubleshooting tool after years of debugging IoT connectivity issues.

5 Upvotes

I've spent a lot of time working with embedded systems, IoT devices, MQTT brokers and network infrastructure.

One of the most frustrating problems I regularly encounter is figuring out why an MQTT device won't connect.

Sometimes it's straightforward. Other times you're trying to work out whether the problem is DNS, a blocked TCP port, a TLS certificate, a WebSocket reverse proxy, broker authentication or something else entirely.

I got tired of working through these problems manually, so I decided to build a tool to make the process easier.

It's called MQTT Doctor.

It's a Windows desktop application that tests each stage of an MQTT connection and helps identify where things are going wrong.

What it does:

  • Checks DNS resolution and TCP connectivity.
  • Supports MQTT 3.1.1 and MQTT 5.0.
  • Tests native MQTT, TLS, WebSockets and secure WebSockets.
  • Inspects TLS certificates and authentication responses.
  • Explains connection failures and suggests possible fixes.
  • Monitors MQTT traffic, connection health and stability.
  • Checks topic subscription permissions.
  • Generates diagnostic reports.

One example from testing:

I connected MQTT Doctor to a real broker on my local network. It successfully verified the TCP connection, completed the MQTT handshake, checked keepalive responses and confirmed a test topic subscription was accepted with QoS 0.

That distinction matters because successfully connecting to a broker doesn't necessarily mean the client has permission to subscribe to the topics it needs.

The tool is designed to show what actually happened at each stage instead of just reporting "Connection failed".

I've also added specific troubleshooting guidance for HAProxy and VerneMQ configurations, which I've encountered quite a bit in my own work.

It's now available in two versions:

Community Edition — completely free. Includes the core MQTT connection and TLS diagnostics.

Professional Edition — $54.99 one-time purchase. Adds advanced monitoring, network analysis and customer reporting.

Everything runs locally. No cloud account, subscription or telemetry.

You can try it here:

https://jpl64.itch.io/mqtt-doctor

This started as a practical engineering tool and has grown into something I'm hoping other developers and IoT engineers will find useful.

I'd genuinely appreciate some feedback, particularly from anyone working with MQTT in production environments.

A couple of things I'd love your thoughts on:

  1. What is the most frustrating MQTT problem you've had to troubleshoot?
  2. What diagnostic feature would make a tool like this genuinely useful in your workflow?

Thanks for taking a look!


r/MQTT • • Nov 03 '26

Weird MQTT connections every 30 seconds

Thumbnail reddit.com
1 Upvotes

r/MQTT • • Nov 01 '26

How to add two states to a root topic in MQTT

4 Upvotes

I have MQTT enabled, but instead of a single state (Texas) listed under settings/MQTT/root topic, I need to include both Arkansas and Texas so I can see users there also. Is this possible? In a nutshell, I want to use MQTT to message folks in both states.

Thanks!


r/MQTT • • Oct 28 '26

Failed to connect to MQTT | Code: -2

2 Upvotes

hey guys, could you help me with this one?

I am working on a school project, and I'm using Wokwi + MQTT + Node-red, but both of them are failing to connect to MQTT, it's returning code -2

I waited one day to see if it was MQTT servers or something like that, but it seems not. Do I have to do something on my side to get it working?


r/MQTT • • Oct 28 '26

MQTT vs Sparkplug B: what does the consumer know when the connection drops?

3 Upvotes

I made a looping animation comparing one temperature signal across Modbus TCP, OPC UA subscriptions, MQTT and Sparkplug B.

Animation: https://www.linkedin.com/feed/update/urn:li:activity:7520430594699448321/

The part I’d like to discuss here is state: plain MQTT can use a Last Will and application-defined availability topics, while Sparkplug standardizes birth/death messages and host state handling. Publishing on change in this example is an application choice, not an MQTT requirement. The animation compresses timing for illustration.

I’m the founder of Proxus and work on industrial data systems.

Do you use Sparkplug in production, or your own payload and availability conventions? What drove that choice?

Reference: https://sparkplug.eclipse.org/specification/version/3.0/documents/sparkplug-specification-3.0.0.pdf


r/MQTT • • Oct 26 '26

TopicBench — a fast, powerfull, free open-source MQTT explorer

Post image
5 Upvotes

I’ve released Topic Bench — a free, open-source desktop MQTT client for viewing, publishing, and managing any size or number of brokers and data sets.

It was built for daily work: multi-broker profiles, a live topic tree that stays usable on huge hierarchies, stickies, search, publish, and TLS — without the resource drag we kept hitting in other explorers.

Windows and Linux builds are on GitHub. Details and screenshots:
https://github.com/unipsycho/topicbench