MQTT on cellular devices: pros and cons (ok: cons?)

I wanted to consult you all on the drawbacks of using MQTT on cellular devices.

Yes, it’s preferable to use webhooks or the Particle API for sending info to other clouds.
But Imagine for a second there is a specific need where using MQTT on Borons can be useful.

I believe the cons of using MQTT on cellular devices are:

  • MQTT requires a permanent connection and can consume your data

I do not know of any other. If that extra data consumption is acceptable, are there any other things one might need to deal with?
What are your experiences?


Curious… what’s the scenario you have in mind. Not sure if this fits MQTT or not but one consideration I had is larger data files rather than the 1024 character limit of Particle.Publish() for device → Cloud or Particle.Function() for cloud → device. Would MQTT allow for greater JSON payloads of data or what would drive the need?

I just don’t know enough about MQTT to know any better. I have a scenario where sending larger payloads of data at a time is needed but so far, I plan on just chunking it up. Are there other scenarios that may make MQTT a preferred option?

I think it can do that too.

it could be a new integration with a system that already uses MQTT.

Hi @gusgonnet ,

Yes, I think so. It is not exactly true that MQTT is low power consumption, it is better to use API and webhook.
As for the reason…

  • MQTT (TLS) uses TCP, which is not exactly low power(need to manage MCU’s the power off/on by myself for low power).
  • API and Webhook are maintained by Particle, so stability can be expected, and it is useful in collaboration with the cloud.
  • Many cloud vendors(Google IoT Core/AWS IoT/Azure…etc) can use MQTT(TLS), but it would be more convenient to work with Particle’s Web API.
  • MQTT-TLS library has a very large library size, because of cipher library.

I maintenance MQTT(TLS) community library, but these should be optional case is good.
When first considering cloud integration of data, I think should consider using Particle API and Webhook.


Thank you Hirotaka for the advice - and for your work on the library.