Jump toUpdate content
IoT Routes interconnect your Hub with services that are not publish/subscribe compatible.
Routes subscribe to topics in your Hub and forward the messages’ payloads to other services, automating the process.
You can use wildcards as Routes topics.
If your route subscribes to Hub events, routes will drop events they generated themselves in order to avoid message loops. However, you need to make sure messages don’t loop between different routes.
REST Routes forward your messages to any RESTful API over HTTP or HTTPS.
You can choose the HTTP verb, the API endpoint and HTTP additional headers to be sent. The route will call the API for each received message.
The HTTP headers will contain the verb you configured as well as the message’s topic (
X-MQTT-Retain which can be
false, depending on whether the message’s retain flag is set or not.
The HTTP request body will contain the message’s payload.
Database Routes forward your messages to a database. PostgreSQL and MySQL are currently supported.
You can choose the connection settings and write an SQL query. This query will be executed against the database each time a message is received. The query can contain two variables:
$TOPIC: the topic of the received message
$PAYLOAD: the payload of the received message
$PAYLOAD variables cannot be written inside quotes nor can their contents be escaped. They are parameters to the prepared query, not substituted in the query string.
Object Storage Routes forward your messages to a Scaleway Object Storage bucket.
You can choose the bucket you want to write to, a path prefix, and one of the two following strategies:
- Per topic: where one topic received equals one object in your bucket. The following messages with the same topic will overwrite previously written objects.
- Per message: where one message received equals one object in your bucket
Depending on the strategy the message payload will be written:
- Per topic: s3://
- Per message: s3://
|Maximum number of Routes per Hub - Shared plan||100|
|Maximum number of Routes per Hub - Dedicated plan||100|
|Maximum number of Routes per Hub - HA plan||100|