mqttplcbroker

Can a PLC connect via MQTT without a broker?


I have to connect a device that sends the information via MQTT, and then I have to use my PLC to do so. I already did it using a virtual broker on a Raspberry Pi, but I need a more reliable solution because this is for a industrial job. Also it will be ideal to be local (that's why we try it out with a Raspberry Pi) so if you know some way to bypass the broker or can recommend me some sort of device to buy that will help me to do so I'll be extremely thankful. My PLC is a 5069-L306ER CompactLogix 5380.

I already tried all the conventional ways. My last idea its to use a server in the plant to work has a broker, but it's not the ideal.


Solution

  • In short, no. You can't do MQTT without a server/broker.

    As noted in both version 3.1.1 and 5 of the MQTT specification:

    MQTT is a Client Server publish/subscribe messaging transport protocol. (emphasis mine)

    In other words, you must have a server. MQTT doesn't support peer-to-peer communication.