# Max number of Edge VerneMQ brokers to Bridge to a central VerneMQ Broker

**URL:** <https://erlangforums.com/t/max-number-of-edge-vernemq-brokers-to-bridge-to-a-central-vernemq-broker/1109>\
**Category:** VerneMQ Questions\
**Tags:** community\
**Created:** [February 21, 2022, 12:31pm UTC](https://erlangforums.com/t/max-number-of-edge-vernemq-brokers-to-bridge-to-a-central-vernemq-broker/1109 "2022-02-21T12:31:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![baoquach](https://erlangforums.com/letter_avatar_proxy/v4/letter/b/a6a055/32.png) [@baoquach](https://erlangforums.com/u/baoquach)\
**Post date:** [February 21, 2022, 12:31pm UTC](https://erlangforums.com/t/max-number-of-edge-vernemq-brokers-to-bridge-to-a-central-vernemq-broker/1109/1 "2022-02-21T12:31:00Z")

</div>

Hi All

We are plaining to 1000 edge devices in next 12 to 24 months to traffic. Each Edge device will 5 Microservice publish and subcribe to local Edge VerneMQ Broker. We would like to using MQTT bridge functionality.  
Can you please let us knwo what maximum number of edge VerneMQ brokers can Bridge to a central VerneMQ Broker ?  
Does bridge support bi-directional. For example same topic that publish on central VerneMQ Broker will Bridge to Edge VerneMQ brokers.

In the event of network offline and the restore Network connection from Edge device to Central on Premise. Does Edge VerneMQ brokers republish offline topics from to central VerneMQ Broker ?

Thank you for your help

---

<div class="post-metadata">

**Author:** ![afa](https://erlangforums.com/user_avatar/erlangforums.com/afa/32/298_2.png) [@afa](https://erlangforums.com/u/afa)\
**Post date:** [February 21, 2022, 9:54pm UTC](https://erlangforums.com/t/max-number-of-edge-vernemq-brokers-to-bridge-to-a-central-vernemq-broker/1109/2 "2022-02-21T21:54:22Z")

</div>

Hi Bao,

Bridging is quite a complex topic, apologies that I cannot lay out all the details here. You can configure pull or push bridges and they have different behaviours. For your case, you probably want to configure pull bridges on the central broker, with clean\_session disabled, so that the messages remain stored on the edge brokers if the bridge is offline.  
Yes, bridges can work bi-directional.

A bridge at its core is just an MQTT consumer and publisher acting as one unit. Therefore, you can operate a relatively high number of bridges. Be aware they run in the same runtime as Verne, though, sharing resources.

I hope this gives some context as a start.

---

<div class="post-metadata">

**Author:** ![baoquach](https://erlangforums.com/letter_avatar_proxy/v4/letter/b/a6a055/32.png) [@baoquach](https://erlangforums.com/u/baoquach)\
**Post date:** [February 23, 2022, 10:59am UTC](https://erlangforums.com/t/max-number-of-edge-vernemq-brokers-to-bridge-to-a-central-vernemq-broker/1109/3 "2022-02-23T10:59:49Z")

</div>

Hi Andre

Thank you your valuable information.

Can you please explain what you mean beysenteance “Be aware they run in the same runtime as Verne, though, sharing resources.”

Thank you for your help

Regards, Bao

---

<div class="post-metadata">

**Author:** ![afa](https://erlangforums.com/user_avatar/erlangforums.com/afa/32/298_2.png) [@afa](https://erlangforums.com/u/afa)\
**Post date:** [February 23, 2022, 2:54pm UTC](https://erlangforums.com/t/max-number-of-edge-vernemq-brokers-to-bridge-to-a-central-vernemq-broker/1109/4 "2022-02-23T14:54:36Z")

</div>

> [@baoquach](#):
>
> Can you please explain what you mean beysenteance “Be aware they run in the same runtime as Verne, though, sharing resources.”

The bridge is a VerneMQ Plugin and will run on the broker. So the Broker and the Plugin share memory and CPU as they run in the same Erlang VM runtime.  
That’s not something to worry about, usually. I just wanted to let you know that the bridge is not an external component but a VerneMQ Plugin.

---

<div class="post-metadata">

**Author:** ![baoquach](https://erlangforums.com/letter_avatar_proxy/v4/letter/b/a6a055/32.png) [@baoquach](https://erlangforums.com/u/baoquach)\
**Post date:** [February 24, 2022, 11:22am UTC](https://erlangforums.com/t/max-number-of-edge-vernemq-brokers-to-bridge-to-a-central-vernemq-broker/1109/5 "2022-02-24T11:22:32Z")

</div>

Hi Andre

Can you please let me know the syntax of -e “DOCKER\_VERNEMQ\_PLUGINS\_\_VMQ\_BRIDGE\_\_TCP\_\_BR0=10.151.42.64:1883”  
is correct ? because my VerneMQ Broker docker container will NOT run.

docker run -p 1883:1883 -p 8888:8888 -e “LISTENER\_TCP\_DEFAULT=127.0.0.1:1883” -e “DOCKER\_VERNEMQ\_LISTENER\_\_TCP\_\_DEFAULT\_\_ALLOWED\_PROTOCOL\_VERSIONS=3,4,5” -e “DOCKER\_VERNEMQ\_LISTENER\_\_TCP\_\_ALLOWED\_PROTOCOL\_VERSIONS=3,4,5” -e “DOCKER\_VERNEMQ\_LISTENER\_\_TCP\_\_DEFAULT\_\_MAX\_CONNECTIONS=200000” -e “DOCKER\_VERNEMQ\_PLUGINS\_\_VMQ\_BRIDGE=on” -e “DOCKER\_VERNEMQ\_PLUGINS\_\_VMQ\_BRIDGE\_\_TCP\_\_BR0=10.151.42.64:1883” -e “DOCKER\_VERNEMQ\_ACCEPT\_EULA=yes” -e “DOCKER\_VERNEMQ\_ALLOW\_ANONYMOUS=on” -e “SHARED\_SUBSCRIPTION\_POLICY=prefer\_local” -e “DOCKER\_VERNEMQ\_VMQ\_WEBHOOKS\_\_POOL\_timeout=6000” -e “DOCKER\_VERNEMQ\_VMQ\_WEBHOOKS.pool\_timeout=60000” -e DOCKER\_VERNEMQ\_LOG\_\_CONSOLE=both -e “DOCKER\_VERNEMQ\_LOG\_\_CONSOLE\_\_LEVEL=debug” -e “LOG\_CONSOLE\_FILE=/opt/scats/log/vernemq.log” -e “LOG\_ERROR\_FILE=/opt/scats/log/vernemq\_error.log” -d vernemq/vernemq &

Thank you for your help

Regards, Bao

---

<div class="post-metadata">

**Author:** ![afa](https://erlangforums.com/user_avatar/erlangforums.com/afa/32/298_2.png) [@afa](https://erlangforums.com/u/afa)\
**Post date:** [February 24, 2022, 3:15pm UTC](https://erlangforums.com/t/max-number-of-edge-vernemq-brokers-to-bridge-to-a-central-vernemq-broker/1109/6 "2022-02-24T15:15:21Z")

</div>

As mentioned in the earlier thread, always use the canonical form in the `vernemq.conf` file as reference.  
In your case this is:

`vmq_bridge.tcp.br0 = 10.151.42.64:1883`

You translate this to: (wrong version)

`DOCKER_VERNEMQ_PLUGINS __VMQ_BRIDGE__ TCP__BR0=10.151.42.64:1883`

Do you see it? 😉

---

<div class="post-metadata">

**Author:** ![baoquach](https://erlangforums.com/letter_avatar_proxy/v4/letter/b/a6a055/32.png) [@baoquach](https://erlangforums.com/u/baoquach)\
**Post date:** [February 25, 2022, 11:23am UTC](https://erlangforums.com/t/max-number-of-edge-vernemq-brokers-to-bridge-to-a-central-vernemq-broker/1109/7 "2022-02-25T11:23:15Z")

</div>

Hi Andre

My translation for mq\_bridge.tcp.br0 = 10.151.42.64:1883 should be  
“DOCKER\_VERNEMQ\_VMQ\_BRIDGE\_\_TCP\_\_BR0=10.151.42.64:1883”

I got my Edge Vernemq Brokers to bridge to central Vernemq Broker.  
Can you please let me how many level Bridge I can configue?  
It possible to update VerneMQ configuration file or properties at runtime?

Thank you for your help and support.

Regards, Bao
