We already had a look into the basics of the Scaleway Elements IoT Hub, in this article we are going to explore IoT Hub Routes.

Note: We recommend to read the articles regarding the basics about the MQTT protocol and the introduction to MQTT topics before continue reading this article.

IoT Routes

Exchanging messages between MQTT publishers and MQTT subscribers is fine, except that not all software is able to understand MQTT and, in a layer between your objects and your application, you may require a few additional software tools to process your data.

What are IoT Routes

A Route is a subscriber that will forward the messages it receives to a range of applications, in example:

  • Databases to save the content of messages in an orderly manner
  • Object Storage for archiving purposes
  • Serverless to trigger a function upon receipt of a message
  • Artificial intelligence to make predictions based on message content
  • Messaging applications to forward your messages to another data stream

The list above is not exhaustive and there are endless other possibilities for intermediate software.

While some routes will only ingest messages (database, storage, messaging, ...), others are also able to react to messages (serverless, AI, ...) allowing you to "reply" with other messages on your IoT Hub.

IoT Route example

For example, in the case of a real-time dashboard, the subscriber is the dashboard itself. It updates itself continuesly as the data is published, no need for it to reply on the incoming messages.
But, if you also need a dashboard that stores historical data, more parts are involved. To achieve this setup, you set up a Route to a database. All incoming messages will be recorded in this database and the dashboard will query it to display the data history.

IoT Hub Routes

To sum up, Routes are the glue between IoT Hub and a lot of other software, to make your life easier and to focus on what makes your value: your job. Fore more information about Routes, refer to our dedicated documentation The number of available Routes is still modest but it will soon increase strongly, do not hesitate to let us know your wishes!