Search code examples
cloudamqpmqtt

Cloud connectivity for MQTT and AMQP?


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.


Solution

  • 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.