Support Topics Documentation Slack YouTube Blog

MQTT broker interaction

Hi,
we are currently investigating a way to integrate a MQTT broker with Backendless, since our devices will connect to it and transfer their data over it. The credentials and access rights shall be stored in a data table for the MQTT broker, so the broker needs to connect and read the data table (should be no problem with a custom plugin). The telemetry data shall also be stored within a data table of Backendless.

Is there a possibility to connect to a MQTT broker with Backendless and publish / subscribe messages on it? If so, how can the data from the broker be parsed and put into the commands that needs to be executed on the data tables (e.g. writing the data to the data tables, maybe sent a push notification, etc.)?

Regards,
Tim

Hello @Tim_Riemann,

To publish messages you can create Backendless API service which will publish messages to your MQTT. If your implementation supports polling then you will able to get messages using Backendless API service, but if you need to hold a connection to MQTT, you will not be able to do that, because the execution time of cloud coud is limited form 5 seconds to 20 seconds, depends on plan and function pack that you have

Hi @sergey.kuk,
ah, okay. Is there anything planned to support MQTT in the future?
So currently, the best practice is to write a small adapter service that connects to the MQTT server and pushes or retrieves the data from or to Backendless, right?

Hello @Tim_Riemann,

currently, we do not have plans to support MQTT.

So currently, the best practice is to write a small adapter service that connects to the MQTT server and pushes or retrieves the data from or to Backendless, right?

yes, you are right.