Dynamic MQTT Importer Tasks


MQTT brokers use topics to filter messages for each connected client. Generally, when ingesting data into flowthings.io, you'll want to use wildcards, so that you can capture large amounts of data.

However, when sending data back to the MQTT broker, dynamic topics can be very useful.

Setting a base MQTT topic is mandated for any MQTT connection. However, we can also set a dynamic topic by adding metadata to the drop. The system will parse the metadata and set it as the new topic.

Example

{
  "path": "/my_account_id/my_first_flow",
  "metadata": {
    "mqttTopic": "/my/new/mqtt/topic"
  },
  "elems": {
    "name": "foo"
  }
}