Mqtt Bridge Filter
In this tutorial, you'll learn about MQTT Bridge Filter Misses Subtopics. We cover key concepts, practical examples, and best practices.
The Problem
MQTT bridge topic filter does not receive messages on subtopics.
Quick Fix
Wrong
topic sensor/temp out 2
// Does not match sensor/temp/indoor```
sensor/temp forwarded but sensor/temp/indoor is not.
### Right
Single-level wildcard (+) — match one level
topic sensor/+/temp out 2 // Matches: sensor/indoor/temp, sensor/outdoor/temp // Does NOT match: sensor/temp
Multi-level wildcard (#) — MUST be last
topic sensor/# out 2 // Matches: sensor/temp, sensor/temp/indoor, sensor/humidity
With topic remapping (prefix)
topic sensor/outdoor/temperature out 2 remote/ // sensor/outdoor/temperature → remote/sensor/outdoor/temperature
Multiple specific filters
topic temperature/inside out 2 topic temperature/outside out 2 topic command/# in 2
sensor/outdoor/temperature forwarded to remote/sensor/outdoor/temperature.
## Prevention
MQTT wildcards: + matches one level, # matches all remaining levels (must be last character). Bridge topic filters use same rules as subscriptions. Use topic prefix remapping to restructure topics on the remote broker. Multiple topic lines supported — use specific filters over # for performance.
DodaTech engineers apply these same patterns across Doda Browser, DodaZIP, and Durga Antivirus Pro for production IoT reliability.
## FAQ
<details style="margin-bottom:12px;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden"><summary style="cursor:pointer;padding:14px 18px;font-weight:600;font-size:1.05rem;background:#f8fafc;border-bottom:1px solid #e2e8f0;color:#1e293b">### Can # be in the middle?</summary><div style="padding:14px 18px;color:#475569;line-height:1.7;background:#fff"><p>No. # must be the last character. sensor/#/temp is invalid. Use + for single-level or sensor/# with app-level filtering.</p>
<h3 id="what-is-topic-remapping">What is topic remapping?</h3><p>Adding a prefix: topic local/temp out 2 remote/ changes local/temp to remote/local/temp on the remote. Useful for multi-tenant systems.</p>
<h3 id="how-many-topic-filters">How many topic filters?</h3><p>Hundreds supported in Mosquitto. Each adds CPU cost — use specific filters, not #, for performance reasons.</p>
</div></details>
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro