MQTT Sources

Connect PEEK to your MQTT broker to observe device messages in real time.

How MQTT Sources Work

When you add an MQTT source, PEEK connects to your broker as a read-only subscriber. It does not publish any messages to your broker — it only listens. PEEK subscribes to the topic pattern you specify and processes every message that arrives.

Adding an MQTT Source

Navigate to Sources in the dashboard and click Add Source. Select MQTT and fill in:

FieldDescriptionExample
NameA label for this sourceProduction Broker
Broker URLYour MQTT broker addresstcp://broker.example.com:1883
UsernameBroker username (if required)peek-reader
PasswordBroker password (stored encrypted)
Topic PatternMQTT topic filter to subscribe todevices/#
Use TLSEnable encrypted connectionRecommended for remote brokers

Topic Patterns and Device ID Extraction

PEEK extracts the device ID from the MQTT topic. By default, it uses the second segment of the topic path. For example:

Topic: devices/sensor-001/telemetry
                  ^^^^^^^^^^^
                  Device ID = sensor-001

The wildcard # subscribes to all sub-topics. Common patterns:

  • devices/# — all messages under the devices/ prefix
  • # — all messages on the broker (use with caution on busy brokers)
  • fleet/+/telemetry — single-level wildcard for specific topics

Offline Detection Threshold

Each source has an offline threshold (default: 300 seconds). If a device has not sent a message within this window, PEEK marks it as offline. Adjust this based on how frequently your devices report in.

Connection Security

For brokers that require TLS, enable the Use TLS option. Your broker credentials are stored encrypted at rest. We recommend creating a dedicated read-only MQTT user for PEEK so it has minimal permissions on your broker.

Tip
If your broker is behind a firewall, you will need to allow inbound connections from PEEK's servers. Contact us for the current IP ranges.