What is the difference between MQTT and AMQP in terms of cloud connectivity? I need to compare these two protocols in terms of cloud connectivity/cooperation. I found some evidence that AMQP works better but I still need to find out the differences.
AMQP allows both the client/broker and client/server architectures. MQTT only allows client/broker architecture. A broker is different from a server in that it acts as a mediator between two parties and, unlike a server, it does not serve a single client.
If you need to handle a high-latency, low-bandwidth environment, then MQTT is the better choice. If extensibility of the protocol is a must-have, then AMQP is the clear choice. If security is high on your priority list, AMQP is the better choice as it has a few more built-in security features.
MQTT (MQ Telemetry Transport) is a lightweight open messaging protocol that provides resource-constrained network clients with a simple way to distribute telemetry information in low-bandwidth environments.
Advanced Message Queuing Protocol (AMQP) is an open source published standard for asynchronous messaging by wire. AMQP enables encrypted and interoperable messaging between organizations and applications. The protocol is used in client/server messaging and in IoT device management.
The big difference here to point out is : are we speaking about AMQP 0.x or AMQP 1.0. They are two completely different protocols and only the latter is a ISO/IEC standard supported by the main open sources products like ActiveMQ and Artemis brokers, Qpid Proton clients and Qpid Dispatch Router. Products like RabbitMQ support AMQP 0.x (only with a plugin the version 1.0). The big difference is that the AMQP 0.x defines the way a broker should be developed and have concepts like exchanges, queues and bindings. No information about it in the AMQP 1.0 which is an application protocol on top of TCP/IP providing more abstraction and not specifying the way a broker should be developed. The first big difference with MQTT is that AMQP 1.0 is a peer-to-peer protocol : you can use it between two peers, no need for a broker in the middle. Of course it's used for communication with broker providing store-and-forward mechanism. You can use it for request/reply pattern and for pub/sub. It has a built-in type system and messages provide metadata information.
MQTT is a lightweight protocol working only with a broker in the middle with no concept of queue (it can store messages when a client is offline using the "clean session" feature). It has another feature over AMQP like the "will" testment. It supports only pub/sub and have no metadata in the messages.
AMQP is more oriented to messaging than MQTT. It was created by JP Morgan for business transactions.
You can find a lot of information about them with in depth comparison. If you need some resources and links please ask me ;)
Paolo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With