# Mosquitto bridging between 2 remotes brokers

**URL:** <https://forum.cedalo.com/t/mosquitto-bridging-between-2-remotes-brokers/1168>\
**Category:** Mosquitto MQTT Broker\
**Created:** [June 4, 2025, 5:10pm UTC](https://forum.cedalo.com/t/mosquitto-bridging-between-2-remotes-brokers/1168 "2025-06-04T17:10:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gamore](https://avatars.discourse-cdn.com/v4/letter/g/6a8cbe/32.png) [@gamore](https://forum.cedalo.com/u/gamore)\
**Post date:** [June 4, 2025, 5:10pm UTC](https://forum.cedalo.com/t/mosquitto-bridging-between-2-remotes-brokers/1168/1 "2025-06-04T17:10:28Z")

</div>

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:

```auto
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:

```auto
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:

```auto
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

---

<div class="post-metadata">

**Author:** ![roger.light](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@roger.light](https://forum.cedalo.com/u/roger.light)\
**Post date:** [June 12, 2025, 8:02am UTC](https://forum.cedalo.com/t/mosquitto-bridging-between-2-remotes-brokers/1168/2 "2025-06-12T08:02:46Z")

</div>

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

```auto
connection remote_broker_A_in
address remoteBrokerA:8423
notifications false

```

Regards,

Roger
