Mosquitto bridging between 2 remotes brokers

Hi There to everyone, it’s nice to be here.
i’m trying to forward data from a remote broker A to another remote broker B, using Mosquitto Bridge.

My bridge.conf is:

connection remote_broker_A_in
address remoteBrokerA:8423

remote_username 12345678
remote_password 12345678

clientid remote_broker_A_in

cleansession true
try_private false
start_type automatic
topic b858e340-e1b9-4283-9c56-f21b7e3f82bf/5920bc50-2be8-11f0-919d-e398a39d51d4/# in 0

max_keepalive 1000
keepalive_interval 25
bridge_protocol_version mqttv311
bridge_insecure true
bridge_capath /etc/ssl/certs
tls_version tlsv1.2

connection remote_broker_B_out
address broker.emqx.io:1883
clientid brigde_from_cmt
start_type automatic

topic pub/b858e340-e1b9-4283-9c56-f21b7e3f82bf/5920bc50-2be8-11f0-919d-e398a39d51d4/# out 0

The log:

Connecting bridge (step 1) remote_broker_A_in (remoteBrokerA:8423)
1749056797: Connecting bridge (step 2) remote_broker_A_in (remoteBrokerA:8423)
1749056797: Bridge WS0216.remote_broker_A_in sending CONNECT
1749056797: Received CONNACK on connection local.WS0216.remote_broker_A_in.
1749056797: Bridge local.WS0216.remote_broker_A_in sending SUBSCRIBE (Mid: 6, Topic: b858e340-e1b9-4283-9c56-f21b7e3f82bf/5920bc50-2be8-11f0-919d-e398a39d51d4/#, QoS: 0, Options: 0x00)
1749056797: OpenSSL Error[0]: error:0A000126:SSL routines::unexpected eof while reading
1749056797: Client local.WS0216.remote_broker_A_in closed its connection.

I’ve tried a mosquitto_sub to the remote Broker A and it works:

mosquitto_sub -d -h remoteBrokerA -t 'b858e340-e1b9-4283-9c56-f21b7e3f82bf/5920bc50-2be8-11f0-919d-e398a39d51d4/#' -u '12345678' -P '12345678' -p 8423 --capath /etc/ssl/certs -k 20

I’m sure that i’m doing something wrong in the bridge.conf.
Thanks for your attention

Hi gamore,

We can see the bridge is making a connection successfully, and only then failing. Something that mosquitto bridges will do normally is send online notifications to the remote bridge. It could be that is the cause of the disconnections.

You could try adding the extra notifications line below as part of your bridge config

connection remote_broker_A_in
address remoteBrokerA:8423
notifications false

Regards,

Roger