Skip to content

Mqtt Broker Bridge

DodaTech 1 min read

In this tutorial, you'll learn about EMQX MQTT Bridge Data Not Forwarding. We cover key concepts, practical examples, and best practices.

The Problem

MQTT bridge configured between two EMQX brokers does not forward messages.

Quick Fix

Wrong

# Bridge config missing forward direction
No messages forwarded between brokers.
# Configure bridge via Dashboard API
curl -u admin:public -X POST http://localhost:18083/api/v5/bridges \
  -H 'Content-Type: application/json' \
  -d '{
    'name': 'remote_bridge',
    'type': 'mqtt',
    'direction': 'both',
    'remote_uri': 'mqtt://remote-broker:1883',
    'topics': [
      {'remote_topic': '/remote/#', 'local_topic': '/local/+/in/#'}
    ]
  }'

# Verify bridge status
curl -u admin:public http://localhost:18083/api/v5/bridges/remote_bridge/status
Bridge status: connected, messages forwarded both directions.

Prevention

Bridge directions: ingress (receive from remote), egress (send to remote), both. Topic mapping can differ between local and remote. Use QoS 1 or 2 for reliable bridging. Enable mountpoint for prefix routing. Check broker connectivity, authentication, and firewall.

DodaTech engineers apply these same patterns across Doda Browser, DodaZIP, and Durga Antivirus Pro for production IoT reliability.

FAQ

### What is a bridge vs cluster?

A bridge connects two independent brokers, possibly across WAN. Cluster is for multiple nodes of the same broker instance on LAN.

Can I bridge to non-EMQX brokers?

Yes. EMQX bridges support standard MQTT (any broker). No special protocol needed.

What is mountpoint?

A prefix added to topics when bridging. e.g., mountpoint = "remote/" adds /remote/ before each topic.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro