- Edited
Sometimes it becomes necessary to configure data transfer between two mqtt brokers. Such functionality is, for example, in Mosquitto MQTT Broker called bridge. This functionality allows you to forward messages from one broker to another, thereby having a copy of the data in two brokers.
Here is an example of setting up a bridge to send data from local topics zigbee2mqtt/# to mqtt.flespi.io:
connection FlespiBroker
address mqtt.flespi.io:8883
topic zigbee2mqtt/# out 0
remote_username YOUR_FLESPI_TOKEN_HERE
bridge_insecure false
try_private false
bridge_protocol_version mqttv311
bridge_cafile /path/to/cert.pem
bridge_tls_version tlsv1.2
Files root.crt and certificate.crt you can get from Google Chrome browser: