This is a quick example to show how to deploy EMQX Cluster with HAProxy MQTT Load Balancing.
For more information like how to configure HAProxy, please see EMQX Documentation: MQTT Load Balancing.
docker compose up -d
Open http://localhost:18083 to visit EMQX Dashboard.
Create 10 clients and subscribe to topic t/{clientid}
with MQTT.
mqttx bench sub --config ./mqttx_cli_emqx_tcp.json
Create 10 clients and subscribe to topic t/{clientid}
with MQTT TLS.
mqttx bench sub --config ./mqttx_cli_emqx_tls.json