Why Can't I Use SUB Mode in Bridge Extension with MQTT 3.1.1?
Question
Can I configure the HiveMQ Bridge Extension in SUB mode to connect to an external MQTT 3.1.1 broker?
Answer
Explanation
The HiveMQ Bridge Extension allows users to bridge messages between HiveMQ Cloud and external MQTT brokers using PUB (publish) and SUB (subscribe) modes. However, there are specific protocol limitations:
SUB mode relies on MQTT 5 shared subscription features, such as topic filters with the
$share
prefix.MQTT 3.1.1 does not support shared subscriptions. As a result, the SUB mode cannot operate properly with MQTT 3.1.1 brokers.
What Happens If You Try?
If you attempt to use SUB mode with a remote broker using MQTT 3.1.1, the following will occur:
The Bridge Extension logs a warning at startup.
The bridge connection fails to initialize.
Supported Configuration
MQTT Version | PUB Mode | SUB Mode |
---|---|---|
MQTT 3.1.1 | ✅ Supported | ❌ Not Supported |
MQTT 5.0 | ✅ Supported | ✅ Supported |
Recommendation
If you're connecting to an external broker (e.g., The Things Stack, which uses MQTT 3.1.1 and QoS 0), you have two options:
Use PUB mode only – Publish data to the external broker from HiveMQ.
Upgrade the external broker to MQTT 5 – If SUB mode is required.
Additional Notes
This is a protocol limitation, not a HiveMQ bug.
No changes or fixes are planned for MQTT 3.1.1 SUB mode compatibility due to MQTT spec constraints.