MQTT Broker Testing

How to test an MQTT broker: connectivity, QoS, TLS, authentication, latency and load tests with ready-to-run scripts, CLI tools and checklists.

Broker Testing

How to Test an MQTT Broker (Online, CLI and Code)

Learn how to test an MQTT broker: check connectivity, publish and subscribe, verify QoS and retained messages, and debug failures — online, with the CLI or in code.

7 min read
Broker Testing

mosquitto_pub and mosquitto_sub: Command Examples & Cheat Sheet

Copy-paste mosquitto_pub and mosquitto_sub examples: flags table, QoS, retained messages, auth, TLS, MQTT 5, files, line mode and filtering output with -F.

7 min read
Broker Testing

emqtt-bench Guide: Every Command and Flag Explained

A complete emqtt-bench guide: conn, pub and sub modes, every important flag, TLS and WebSocket options, latency headers and how to read the output counters.

10 min read
Broker Testing

Free MQTT Brokers for Testing: Which One to Use

Which free MQTT broker should you test with? Shared endpoints, public sandboxes, free-tier private brokers and local Docker brokers compared, with commands.

8 min read
Broker Testing

Testing MQTT 5 Features: User Properties, Expiry, Topic Aliases

Hands-on tests for MQTT 5 features with MQTT.js and paho-mqtt: user properties, message and session expiry, topic aliases, request/response and no-local.

10 min read
Broker Testing

How to Read MQTT Benchmark Results Without Fooling Yourself

Interpret MQTT benchmark results correctly: why averages lie, how coordinated omission hides latency, how to spot client bottlenecks and report numbers.

8 min read
Broker Testing

Test Which MQTT Features a Broker Supports (MQTT 5, QoS 2, Retain)

Probe an MQTT broker's real capabilities: read CONNACK properties and check maximum QoS, retained messages, wildcards and shared subscriptions in Python.

9 min read
Broker Testing

MQTT Broker Health Check: Scripts for Monitoring Uptime

Health-check scripts in Bash, Python and Node.js that connect, publish and receive a message, with exit codes for cron, Nagios and Kubernetes probes.

9 min read
Broker Testing

MQTT Broker Load Testing: Benchmark Throughput and Latency

How to load test an MQTT broker: measure messages per second, connection limits and p99 latency with emqtt-bench, mqtt-benchmark and a Python script.

9 min read
Broker Testing

Reading MQTT Broker Logs to Debug Clients

How to read Mosquitto and EMQX logs: set the right log levels, decode connect and disconnect lines, trace one client and match log messages to the fix.

9 min read
Broker Testing

Chaos Testing MQTT: Network Partitions, Packet Loss and Broker Restarts

Chaos testing for MQTT: inject latency and packet loss with tc netem, partitions with iptables and Toxiproxy, restart the broker and verify clients recover.

11 min read
Broker Testing

HiveMQ MQTT CLI: Test Any Broker from the Terminal

Use the open-source HiveMQ MQTT CLI to test any broker: install it, publish and subscribe, use the interactive shell and run mqtt test to probe broker features.

8 min read
Broker Testing

MQTT Connection Stress Test: How Many Clients Can a Broker Handle?

MQTT connection stress test: open tens of thousands of clients, fix ulimit and ephemeral port limits, use multiple source IPs and simulate reconnect storms.

9 min read
Broker Testing

Contract Testing MQTT Messages with JSON Schema

Define MQTT payload contracts with JSON Schema, validate them in Python and Node.js tests and at runtime, and version schemas without breaking subscribers.

9 min read
Broker Testing

Build an MQTT Device Simulator in Python

Build an asyncio MQTT device simulator in Python: 1,000 virtual devices with unique client IDs, Last Will, realistic intervals, commands and power-loss faults.

10 min read
Broker Testing

End-to-End Testing for IoT Systems over MQTT

Build end-to-end tests for MQTT IoT systems: simulate a device, publish via the broker and assert on backend, database, API and UI with pytest and Playwright.

10 min read
Broker Testing

Test an ESP32 MQTT Connection Step by Step

ESP32 not connecting to MQTT? Test Wi-Fi, DNS, the TCP port, client ID, credentials and buffer size one by one with a diagnostic sketch and serial logs.

8 min read
Broker Testing

MQTT Explorer: How to Inspect and Debug a Broker

How to use MQTT Explorer to browse the topic tree, find and delete retained messages, diff payloads, plot values and connect securely to a broker over TLS.

8 min read
Broker Testing

MQTT Fan-In Test: Thousands of Devices, One Backend

How to test MQTT fan-in: simulate thousands of publishers, measure consumer backlog and lag, then scale ingestion with shared subscriptions.

9 min read
Broker Testing

MQTT Fan-Out Test: One Publisher, Thousands of Subscribers

How to benchmark MQTT fan-out: broadcast topics, 10,000 subscribers with emqtt-bench, delivery spread with a Python probe, and the bandwidth math behind it.

9 min read
Broker Testing

Fuzz Testing MQTT Clients and Payload Parsers

Fuzz test MQTT payload parsers and message handlers with Hypothesis, Atheris and fast-check so malformed messages never crash your subscribers or workers.

9 min read
Broker Testing

MQTT Load Testing with Gatling: Setup, Scenario and Reports

Load test an MQTT broker with Gatling: add the MQTT plugin, write a Java simulation with connect, subscribe and publish checks, then read the HTML report.

9 min read
Broker Testing

Testing MQTT Clients in Go

Test Go MQTT clients with go test: paho.mqtt.golang and autopaho helpers, channels for message assertions, table-driven QoS tests and fakes for unit tests.

9 min read
Broker Testing

Hardware-in-the-Loop Testing with MQTT

Build an MQTT hardware-in-the-loop rig: real devices on a test broker, pytest automation, power cycling, serial logs, failure injection and CI reports.

9 min read