Skip to content

MQTT Messaging

Meridian VMS uses MQTT for real-time communication between the management server and recording servers. MQTT enables instant push of configuration changes to recorders without requiring service restarts.

Management Server Recording Servers
│ │
│ Publish: config commands │
├────────────────────────────────────>│
│ │
│ Subscribe: heartbeat/status │
│<────────────────────────────────────┤
│ │
└──────────── MQTT Broker ────────────┘
(port 1883)

The MQTT broker runs on the management server host. Recording servers connect to the broker on startup and maintain a persistent connection throughout their lifecycle.

The management server publishes configuration commands when changes need to be applied to a specific recording server in real time. Each recording server subscribes to its own command channel on startup.

Supported commands:

CommandPayloadEffect
add_cameraCamera configurationRecorder begins ingesting and recording the new camera
remove_cameraCamera identifierRecorder gracefully stops recording and releases the camera stream
update_cameraUpdated camera configurationRecorder restarts the affected camera pipeline with new settings
update_detection_configDetection configurationRecorder updates AI detection parameters without restarting the video pipeline

Recording servers publish periodic heartbeat messages to confirm they are alive and report per-camera status. The management server subscribes to heartbeat channels to update the online/offline state displayed in the web interface.

MQTT broker connectivity is configured during installation. The management server connects to the broker on startup and recording servers are configured with the broker address as part of their setup process.

  • Instant propagation — Camera additions, removals, and setting changes take effect within seconds
  • No restart required — The recorder daemon applies changes on the fly without stopping active recording pipelines
  • Reduced load — Eliminates periodic polling requests from every recording server
  • Scalable — MQTT handles hundreds of connected recorders efficiently with minimal overhead

If configuration changes are not being applied to a recording server:

  1. Verify the MQTT broker is running: sudo systemctl status mosquitto
  2. Check the recorder daemon logs for MQTT connection errors: sudo journalctl -u meridian-recorder -f
  3. Confirm the MQTT broker address is correctly configured on the recording server
  4. Test broker connectivity from the recorder host