Message Relay

The ClearBlade Message Relay is a way for edge MQTT clients to communicate with the Novi MQTT clients as well as other Edge MQTT clients. In order to achieve this there are a few reserved MQTT topic paths that one needs to follow for the message relay to work. The message relay uses the following 6 topic paths to route messages between edges and their parent platform.

Note

Message relay applies to communication between edges and platform within one single system

Edge to Platform message

For sending a MQTT message from the edge to its parent platform use the following topic path:
<TOPIC_NAME>/_platform

For receiving a message on the platform, you need to subscribe to the same topic

Platform to Edge message

For sending a MQTT message from the platform to an edge connected to it, use the following topic path:
<TOPIC_NAME>/_edge/<NAME_OF_EDGE>

For receiving a message on the edge, you need to subscribe to the same topic

Edge to Edge message

For sending a MQTT message from an edge to another edge, use the following topic path:
<TOPIC_NAME>/_edge/<NAME_OF_EDGE>

Here the <NAME_OF_EDGE> should be the name of the other edge that will receive the message. For receiving a message on the other edge, you need to subscribe to the same topic

Platform to All Broadcast message

For sending a MQTT message from the platform to all edges, use the following topic path:
<TOPIC_NAME>/_broadcast

For receiving a message on all the edges, you need to subscribe to the same topic

Edge to All Broadcast message

For sending a MQTT message from an edge to all other edges and the platform, use the following topic path:
<TOPIC_NAME>/_broadcast

For receiving a message on all the other edges and the platform, you need to subscribe to the same topic

Edge to Edge and Platform message

For sending a MQTT message from an edge to another edge and to the platform, use the following topic path:
<TOPIC_NAME>/_edgeAndPlatform/<NAME_OF_EDGE>

Here the <NAME_OF_EDGE> should be the name of the other edge that will receive the message. For receiving a message , you need to subscribe to the same topic on the platform as well as the other edge