Sending message from Niagara to ClearBlade IoT Core MQTT
After you connected the Niagara device to the MQTT bridge, it can publish a telemetry event.
The Niagara device can publish the telemetry event by issuing a PUBLISH message to an MQTT topic in the following format: /devices/DEVICE_ID/events/#.
Devices can publish data to additional Cloud Pub/Sub topics. By default, MQTT messages published to /devices/DEVICE_ID/eventsare are forwarded to the corresponding registry's default telemetry topic. You can specify a subfolder in the MQTT topic to forward data to additional Cloud Pub/Sub topics. The subfolder is the subtopic after/devices/DEVICE_ID/events.
Messages are forwarded to the default Cloud Pub/Sub topic instead of the additional Cloud Pub/Sub topic in the following cases:
- No subfolder is specified in the MQTT topic.
- A subfolder is specified in the MQTT topic, but does not have a matching device registry's Pub/Sub topic. For example, if the device publishes to the MQTT topic/devices/DEVICE_ID/events/alerts, the subfolder is the string alerts. Messages are forwarded to the additional Cloud Pub/Sub topic if the eventNotificationConfigs[i].subfolderMatches and eventNotificationConfigs[i].pubsubTopicName fields are set to alerts. Otherwise, messages are forwarded to the default Cloud Pub/Sub topic.