Should I use MQTT or HTTP

0 votes

Hi...
I'm actually working on a device that senses and collects data such as temperature, humidity, etc.

It's got a solar charged battery. 

Most of the time it's in a deep sleep state and wakes up only when it needs to sense and transfer data. This operation takes about 1-2 minutes, and then it goes back to sleep.

I'm not an expert in this area, but I think MQTT should be a good option if the device needs to be accessible to receive messages from a topic all the time, but in my case, it only read sensors and sent data to a server periodically.

Currently I'm sending the data through HTTP, but I'm wondering if it makes sense to implement MQTT? 

Sep 3, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
709 views

1 answer to this question.

0 votes

After testing MQTT vs HTTP(REST) over SSL from a normal server and a Raspberry Pi board, we inferred that the results depend on use-case and device where the process is running. This is true, both from a performance point of view and energy consumption.

In your case, we have a special test as well => delivering many messages (multiple probes) via HTTP, HTTP-batch or MQTT. I've come to the conclusion that:

  • If you have the possibility to send data in one HTTP request - it will be the best option. 
  • MQTT is on the second place.
  • HTTP with per-message delivery is much less power efficient and slower then MQTT.
answered Sep 3, 2018 by Annie

Related Questions In IoT (Internet of Things)

0 votes
1 answer

Should I Repair or Rewrite?

If it's a small system, and you ...READ MORE

answered Sep 25, 2018 in IoT (Internet of Things) by Annie97
• 2,160 points
554 views
0 votes
1 answer

How to use the data I receive from Azure IoT Hub?

The payload you receive will be a ...READ MORE

answered Aug 1, 2018 in IoT (Internet of Things) by DataKing99
• 8,250 points
1,808 views
0 votes
1 answer

How do I compare MQTT and TCP packets ?

It depends on the higher-level protocols (above ...READ MORE

answered Aug 27, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
1,250 views
0 votes
1 answer

Can i use ESP8266 as a network adapter?

With the Espressif SDK 1.5.2 for the ESP8266 it's not possible ...READ MORE

answered Sep 12, 2018 in IoT (Internet of Things) by Annie97
• 2,160 points
2,689 views
0 votes
1 answer

MQTT protocol connection error

Ok so you need two libraries to ...READ MORE

answered Jul 6, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points

reshown Jul 6, 2018 by Vardhan 3,067 views
0 votes
1 answer

Mosquitto 1.4.2 Websocket support

down vote In the dir mosquitto-1.4.X edit the ...READ MORE

answered Jul 9, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
1,429 views
0 votes
1 answer

IoT request response protocol

Based on your requirement of a light ...READ MORE

answered Jul 13, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
1,843 views
0 votes
1 answer

What is the maximum message length for a MQTT broker?

It's not entirely clear what you're asking ...READ MORE

answered Jul 17, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
9,463 views
0 votes
1 answer

NodeMCU HTTP : How to use HTTPS post request?

Your firmware might not have SSL/TLS enabled. ...READ MORE

answered Feb 11, 2019 in IoT (Internet of Things) by Shubham
• 13,490 points
3,649 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP