for rodw
MQTT is not exactly an industrial protocol. It's more for tasks like: you're sitting in the office and want to check how your kettle or microwave at home is working or control them. For this, you need to choose a broker server on the internet (paid or free).
OPC UA is an industrial solution. It's better suited for operating machines and other industrial equipment. As for them not being real-time protocols, it's not entirely true: My experience with standard OPC UA showed it's limited to a frequency of 50 ms. However, the OPC UA TSN protocol theoretically works faster than Ethercat. I wanted to create an OPC UA TSN server, but the problem is that the rtapi_mutex_get() function doesn't work in RTAPI. This doesn't allow scanning the HAL environment in real-time. For now, the solution I see is to create TSN variables in parallel with HAL variables. Accordingly, this requires going through all the Linuxcnc sources and adding the creation of TSN variables next to HAL variables.
Here is the best presentation on OPC UA TSN (FX) that I've been able to find so far.
2020.ieee-etfa.org/static/files/2020/tal...des.f5c2b5d40109.pdf
The open62541 library allows everything to be done. The technical limitation is that you must have an Intel Ethernet controller (i210/211, i225/226) onboard