UDP messages are limited to 65.507 bytes.datagrams are limited to single packets (around 1500 byte).
Advantage is that message handling is easy.
TCP overhead is often overestimated. Opening a connection, send a byte and close is a waste of resources. But it is efficient if you send large amount of data or if you establish a connection and keep it open.a protocol that can queue (and re-assemble) larger data packets, but without the overhead of TCP
TCP provides a byte stream, so message handling is a bit more complicated. You have to track messages in th eapplication (which sounds more complicated than it is).
MQTT uses TCP under the hood. "The MQTT protocol itself defines a MQTT PUBLISH payload size limit of 256MB. For a majority of the M2M and IoT scenarios this is a very high limit and most clients will probably never send a message with a payload which is that huge." /HiveMQ/MQTT is meant for small data packets
Advantage of MQTT is build in the message concept which makes it easy to use.
Statistics: Posted by ghp — Sat Jul 20, 2024 1:52 pm