Multi-threaded MQTT device emulator for platform validation
Test GPRS modem and 4G water meter integrations without hardware—publish realistic sensor data and device failure states over MQTT at scale.
What it is
GPRS Modem & NovaFlow MQTT Simulator is a Java standalone utility that emulates IoT device behavior over MQTT for rapid platform testing. It provides two independent simulators: a GPRS emulator that spawns one thread per configured controller—each publishing sensor readings and RSSI at random 1–14 minute intervals with occasional failure states—and a NovaFlow 4G water meter simulator that publishes either hardcoded test data or replays historical messages from the database. Both connect via Eclipse Paho MQTT client with optional SSL/TLS, read all controller settings from the platform database, and output timestamped JSON payloads without requiring physical modems or meters.
Key benefits
Deploy and test without hardware
Spin up N simulated GPRS modems or NovaFlow meters in seconds. No GPRS modules, 4G devices, or SIM cards needed. Perfect for lab validation, CI/CD integration, and multi-site load testing.
Realistic device behavior at scale
Each simulated device runs in its own thread with independent publish cadence (1–14 minute random intervals), device failures (1-in-7 chance of RSSI-only error states), and connection lifecycle. Matches real-world IoT variability.
Database-driven configuration
Read controller list, MQTT broker settings, and credentials directly from the platform database. Add or remove simulated devices by updating the controller table—no code changes or config files needed.
Replay or generate test data
NovaFlow simulator supports both live test-data generation and historical message playback from the database. Useful for regression testing, performance profiling, and customer issue reproduction.
Capabilities
- Multi-threaded MQTT publishing with one independent thread per simulated device
- SSL/TLS encryption for MQTT broker connections with JKS keystore support
- Random sensor data generation (tags 4, 47, 49) plus RSSI signal strength
- Simulated device failures: random 1-in-7 chance of publishing error states
- Random publish cadence: 1–14 minute intervals per device
- Database-driven config: read controllers, connection settings, and credentials from platform database
- Historical message replay: NovaFlow simulator can replay real MQTT messages captured in the database
- Per-controller logging via customizable configurable logging framework with rotation and level control
- JSON payload serialization matching real GPRS and NovaFlow device formats
