Problem Statement
Currently the Mosquitto bridge sets the flags “No Local” and “Retain as Published” to true in MQTT 5.0 when subscribing from the remote MQTT 5.0 broker. This functionality is hard coded.
This causes issues because some brokers do not support these flags and drop the connection. A fallback to MQTT 3.1.1 is not a viable workaround in our case.
Change Request
Please make the use of these two flags configurable while keeping the behaviour backwards compatible.
Suggested Modifications
mosquitto.conf
Add two settings:
- bridge_no_local (default true to be backwards compatible)
- bridge_retain_as_published (default true to be backwards compatible)
src/conf.c
- parse the two configurations above (if missing set to true to be backwards compatible)
src/bridge.c
- Only set MQTT_SUB_OPT_NO_LOC if bridge_no_local is true
- Only set MQTT_SUB_OPT_RETAIN_AS_PUBLISHED if bridge_retain_as_published is true
Problem Statement
Currently the Mosquitto bridge sets the flags “No Local” and “Retain as Published” to true in MQTT 5.0 when subscribing from the remote MQTT 5.0 broker. This functionality is hard coded.
This causes issues because some brokers do not support these flags and drop the connection. A fallback to MQTT 3.1.1 is not a viable workaround in our case.
Change Request
Please make the use of these two flags configurable while keeping the behaviour backwards compatible.
Suggested Modifications
mosquitto.conf
Add two settings:
src/conf.c
src/bridge.c