The device and AWS IoT Core use publish-subscribe based communication model using topics. In this task, you use MQTT client which is part of AWS IoT Core to publish messages to iot/dojoinbound topic and due to the IoT rule configuration, the message will be published to the Timestream database table.
-
On the AWS IoT Core console, click on Test menu in the left to open MQTT client. Click on the Publish to a topic link.
-
It moves to the publish topic part of the MQTT client, type in iot/dojoinbound as the topic name. Copy-Paste the message shown below and click on the Publish to topic button.
{ "temperature": 40, "vibration": 30, "pressure": 25 }
`
-
The message is published to the AWS IoT Core. Repeat the steps to publish another message as shown below.
{ "temperature": 35, "vibration": 20, "pressure": 20 }
`
-
Both messages got published. Due to IoT rule which is looking for the messages published to the topic iot/dojoinbound, the rule will pick the messages and route to the Timestream database table as configured in the rule action.
-
Let’s check the data published in the Timestream database table.