Home of RF and Wireless Vendors and Resources

One Stop For Your RF and Wireless Need

MQTT vs HTTP | Difference between MQTT and HTTP protocols

This page compares MQTT vs HTTP and mentions difference between MQTT and HTTP protocols.

MQTT Protocol

Broker based MQTT protocol

The figure-1 depicts simple MQTT protocol architecture (broker based). Following are the features of MQTT protocol:
• It is over TCP.
• It uses SSL/TLS for security.
• There are many messages used in MQTT protocol such as CONNECT, PUBLISH, SUBSCRIBE, DISCONNECT etc.
• Username/Password is used in 'connect' message.
• It encrypts payload i.e. it is payload agnostic.
• 1883 port is used by MQTT protocol.

Refer MQTT Protocol>> for more information.

HTTP Protocol

HTTP connection

The figure-2 depicts, HTTP connection between client (web user) and web server. It uses normal IP header for routing of packets and data are not encrypted before transmission.
Refer HTTP vs HTTPS>> for more information.

Following table mentions comparison between MQTT and HTTP protocols.


Features MQTT HTTP
Full Form Message Queue Telemetry Transport Hyper Text Transfer Protocol
Design Methodology The protocol is data centric. The protocol is document centric.
Architecture It has publish/subscribe architecture. Here devices can publish any topics and can also subscribe for any topics for any updates. It has request/response architecture.
Complexity simple more complex
Data security YES NO, hence HTTPS is used to provide data security.
Upper layer protocol It runs over TCP. It runs over UDP.
message size small, it is binary with 2Byte header. Large, it is in ASCII format.
Service levels 3 1
Libraries 30KB C, 100KB Java Large
Port number 1883 80 or 8080
Data distribution 1 to 0/1/N one to one only

IoT Wireless Technologies

WLAN    ➤THREAD    ➤EnOcean    ➤LoRa    ➤SIGFOX    ➤WHDI   
Zigbee   ➤6LoWPAN   ➤Zigbee RF4CE   ➤Z-Wave   ➤NFC   ➤RFID   ➤INSTEON  

What is difference between

Difference between OSI and TCPIP layers  Difference between TCP UDP  FTP vs HTTP   FTP vs SMTP   FTP vs TFTP   ARP vs RARP   NAT vs PAT   RIP vs OSPF  SLIP vs PPP  IMAP4 vs POP3  IPV4 vs IPV6 

RF and Wireless Terminologies


Share this page

Translate this page