-
Notifications
You must be signed in to change notification settings - Fork 928
bridge_protocol
Bridges are essentially just client connections to another broker.
RSMB added (and Mosquitto followed) a non-spec feature that allows an RSMB to recognise an inbound connection as another RSMB bridge. From a thread on the google group:
You are right, RSMB recognizes when another RSMB connects to it via a bridge by using a different protocol version number (when try_private is true, which is the default). If that connect fails, then the bridge will fall back to MQTT 3.1. This internal protocol is the same as MQTT 3.1 except that:
- the retained flags are propagated on publish packets, and
- the subscriptions are nolocal (in the JMS sense), to reduce the chances of infinite message loops.
This behaviour is easy to apply when the broker is the one making the bridge (outgoing topics) because it knows that the client is a bridge. For incoming topics the different protocol number is used. The protocol number is the actual protocol number (3) OR'd with 128 (bit 8).
Both RSMB and Mosquitto implement this behaviour - but it is not a formal part of the protocol specification.
MQTT Community Wiki by mqtt.org community members is licensed under a Creative Commons Attribution 4.0 International License and was made possible by the generosity of all of its contributors.