Help Center> Intelligent EdgeFabric> User Guide> Edge-Cloud Messages> Edge Nodes Reporting Messages to the Cloud

Edge Nodes Reporting Messages to the Cloud

Scenario

IEF allows edge nodes to report messages to the cloud.

You can publish data to a custom topic in SystemEventBus (MQTT broker) of edge nodes. IEF forwards these data to a DIS stream or an API Gateway address. Then, you can extract the data for processing and analysis.

This section uses the DIS endpoint as an example. The method of using the API Gateway endpoint is similar. The procedure is as follows:

  1. Creating an Endpoint
  2. Buying a DIS Stream
  3. Creating a Route
  4. Sending a Message

Creating an Endpoint

  1. Log in to the IEF console.
  2. In the navigation pane, choose Edge-Cloud Messages > Endpoints.
  3. Click Create Endpoint in the upper right corner. Select DIS for Type, and enter an endpoint name.

    Figure 1 Creating an endpoint

  4. Click OK.

Buying a DIS Stream

Before sending messages to DIS, buy a DIS stream.

  1. Log in to the DIS console.
  2. Click Buy Stream in the right corner and set parameters.

    Figure 2 Buying a DIS stream

  3. Click Next and Submit.

Creating a Route

  1. Log in to the IEF console.
  2. In the navigation pane, choose Edge-Cloud Messages > Routes.
  3. Click Create Route in the upper right corner.
  4. Set parameters.

    Figure 3 Creating a route
    • Source Endpoint: Select SystemEventBus.
    • Source Endpoint Resource: Select Custom topic, select the edge node that will send messages, and enter a topic name.
    • Destination Endpoint: Select the endpoint created in Creating an Endpoint.
    • Destination Endpoint Resource: Select the DIS stream purchased in Buying a DIS Stream.

    Record the topic, as shown in the red box in the preceding figure.

  5. Click Create.

Sending a Message

Use the MQTT client on the edge node to send messages.

In this example, the message needs to be published to the topic specified in Creating a Route. As shown in the following figure, mosquitto_pub is used to send a message.

Figure 4 Sending a message

After the message is sent, you can view the Forwarded Messages column in the route list to check whether the message is successfully forwarded by the route.

Figure 5 Number of forwarded messages

You can view incoming messages on the DIS console. For details on how to obtain data from DIS, see Obtaining Data from DIS.

Figure 6 DIS data monitoring