๐Ÿ“Š MQTT vs. OPC UA: Bandwidth Usage – Unexpected Results!?

๐Ÿค” I often heared about claims that MQTT requires less bandwidth than OPC UA. In my own testing, I found the opposite to be true!

๐Ÿงช I took a tree of over 3,500 topics, changing every topic once a second and replicated the exact same structure in OPC UA. In MQTT I was using a simple JSON payload of TimeMS plus the Value (just to note: OPC UA transmits more information than that). I also tried a version with just the plain value as a string. Then, I compared the network I/O stats of client programs subscribing to all those tags, both for OPC UA and MQTT, and confirmed that both clients are receiving all values.

๐Ÿ‘‰ MQTT didnโ€™t show a bandwidth advantage – in fact, it used four to six times the bandwidth of OPC UA in this setup! See the results. 200 KB/s vs 50 KB/s

And, to be honest, it makes sense: every single value change in MQTT includes the full topic name (enterprise/site/area/cell/…), creating a high overhead compared to OPC UA.