Author Topic: MQTT protocol  (Read 1895 times)

0 Members and 2 Guests are viewing this topic.

Offline BlogRahulTopic starter

  • Regular Contributor
  • *
  • Posts: 75
  • Country: in
MQTT protocol
« on: March 14, 2022, 12:49:45 pm »
I have  heard a lot about the MQTT protocol I am trying to understand why MQTT protocol used in IoT insted of HTTPs.
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 5431
  • Country: si
Re: MQTT protocol
« Reply #1 on: March 14, 2022, 01:08:10 pm »
MQTT consumes less data traffic, is simpler to implement for a microcontroller and allows bidirectional communication (so when someone publishes new data everyone who wants it instantly gets the data forwarded to them, in http you have to poll the server)
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 11405
  • Country: fi
Re: MQTT protocol
« Reply #2 on: March 14, 2022, 02:55:10 pm »
Hypertext Transfer Protocol aka. HTTP is designed for serving web pages from a single server to multiple clients.

MQTT is designed for sending small measurement data packets in whatever (usually efficient) format to a central server, which then further distributes the messages to the subscribers.

Quite a different use case.
 

Offline jancumps

  • Supporter
  • ****
  • Posts: 1273
  • Country: be
  • New Low
Re: MQTT protocol
« Reply #3 on: March 14, 2022, 03:59:50 pm »
Yes.
MQTT is closer to a Java Message Server and the likes, where you can publish messages, and subscribe to messages.  You talk to a distribution service, and indicate a subject (topic). You don't (have to) know the final interested party/ies.
HTTP is closer to a remote procedure call. You talk to a single end point.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->