Template-driven generators are the practical default for functional MQTT pipeline testing. They model per-device payloads and let teams reproduce exact sensor shapes, metadata and authentication details. Mer, a Rust CLI from iotmertech, exemplifies that approach: it crafts high-fidelity sensor payloads and can publish them over MQTT, HTTP or TCP, ships prebuilt binaries for Linux, macOS and Windows, offers a container image, example YAML configs and a Docker Compose recipe to plug into a local Mosquitto broker, and its README explicitly says it's not intended for load testing. Treat mer as the go-to tool for per-device and parser validation, and pair it with a dedicated load simulator when you need to measure broker throughput.
Three approaches dominate IoT test data generation: template-driven generators, simple scripts or SQL-based population, and full-featured commercial simulators. Each answers a different engineering question, and choosing the wrong one wastes time and budget.
Template-driven generators for functional testing
Template-driven tools let engineers model device behavior at the payload level, and mer is a clear example. Published by iotmertech, the iot-data-generator project provides a Rust command-line tool named mer that generates realistic IoT sensor payloads and can send them over MQTT, HTTP or TCP. The project supplies Handlebars template support so teams control payload structure, and it emits random sensor fields such as temperature, humidity, voltage, current, power, energy and status to mimic real devices.
Mer focuses on fidelity rather than hammering a broker. Its README and releases page offer prebuilt binaries for Linux, macOS and Windows and a container image, plus configuration examples and run instructions. The repository includes example YAML configs and a Docker Compose option so teams can combine mer with a local Mosquitto broker during development. Mer also includes authentication options, TLS for MQTT, environment variable expansion for secrets, and a validation or preview mode so developers can inspect a device payload before it's published. Run control options let teams set message count, intervals or a time limit to shape device behavior without building extra infrastructure.
That design makes mer the right tool when the problem is parser correctness, routing rules, or rules-engine behavior. If a pipeline drops or mis-parses a particular device field, or if an analytics transform depends on per-device metadata, mer lets engineers reproduce those exact shapes and sequences. The project distributes binaries and a container image via GitHub Releases and GitHub Container Registry, which simplifies local testing and CI integration.
Simple, code-first approaches remain useful for fast feedback and storage validation. For example, a compact Python sensor simulator implemented in firmware/sensor_sim.py produces one temperature reading per second, publishes JSON to a sensors/temperature MQTT topic, uses paho-mqtt for client connectivity, and generates timestamps in UTC while sampling temperature uniformly between 20.0°C and 30.0°C, according to documentation reflected in DeepWiki.
That pattern is minimal to understand client libraries and basic broker behavior.
Database-focused examples take a different slice of testing. A TimescaleDB-focused guide on Dev.to shows how to create sensors and a sensor_data hypertable and then bulk-populate it with SQL using generate_series to produce time-series data for querying and capacity testing. Those approaches let teams validate storage, query performance and analytics pipelines without exercising broker or protocol edge cases, which is a useful complement to payload-level testing when the question is whether the database and downstream queries scale.
In short, scripts and SQL are fastest to validate storage and query patterns. They're the least realistic at the per-device payload level, but they're efficient when your goal is capacity planning for databases or analytics back ends.
Full-featured commercial simulators sit at the other end of the spectrum. Gambit Communications offers the MIMIC suite and a MIMIC MQTT Simulator that advertise the ability to simulate very large fleets and full protocol behavior, including authenticated MQTT clients, TLS connections, configurable Quality of Service and fault scenarios. Published material from the vendor cites simulation of up to 100,000 MQTT publishers. That capability is useful for end-to-end performance testing, benchmarking brokers and load balancers, and creating heterogeneous, production-like labs where connection churn, session state and broker limits are the primary concerns.
Commercial platforms are positioned for teams that need to measure broker throughput, connection limits or complex failure modes. They're more expensive and require integration, and the vendor materials note those products are offered commercially through the vendor's contact channels, with documentation and demo material available on the vendor site.
All three approaches include examples for TLS and authenticated connections across their documentation, which highlights a consistent point: testing should cover both plaintext and secured broker configurations. TLS changes timing, CPU usage and connection behavior; authentication alters session state and failure modes. Every realistic test plan includes secured and unsecured runs.
Choosing a tool is about matching the test to the question. If you need to validate parsers, metadata extraction, routing rules or device-level transforms, template-driven generators like mer reduce the friction of reproducing specific payload shapes and authentication details.
If your objective is to exercise storage and query performance, a SQL or database-focused workload is faster to implement. And if you need to push brokers to their limits or simulate attacker-like fault scenarios, a commercial simulator such as MIMIC is designed for that job.
Mer's README is explicit about the boundary: it's pitched as a high-fidelity test-data generator rather than a load tester, so teams that need to measure throughput or connection scale should complement it with a dedicated load simulator or a commercial product that advertises high publisher counts. That division keeps projects practical and prevents teams from applying the wrong tool to the wrong problem.
Related Articles
- AI video interviews scale hiring but accept nonsense as fit
- Automate file renaming with AI
- TCS 2026: 3 gates non-CS Java devs must clear
Template-driven generators such as mer should be the default for functional MQTT testing. Use a commercial simulator only when your test question is broker throughput or connection-scale limits.
This article was created with AI assistance.