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

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

2 Likes

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.

2 Likes

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

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.

2 Likes

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

1 Like

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? :wink:

1 Like

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

1 Like