AWS Part 3 - Publishing and Subscribing to a Topic with deviceWISE

The section describes to publish to a MQTT topic created in AWS Part 1 - Setting up AWS IoT.
To publish to a topic, do the following:
- In the AWS IoT console, in the left menu, click Test.
- Subscribe to the topic defined in AWS Part 1 - Setting up AWS IoT. Make sure the name of the topic (TestTopic) is exactly the same as you have defined while defining the trigger in AWS Part 2 - Setting a AWS IoT Core connection.
The topic message log page, TestTopic, opens and TestTopic appears in the Subscriptions column. - In the Workbench,
- Make sure the device is in the started state. If not, Start the device. For more information on Starting the device, see AWS Part 2 - Setting a AWS IoT Core connection.
- Make sure the project is started. If not, Start the project. For more information on Staring the project, see AWS Part 2 - Setting a AWS IoT Core connection.
- Make sure the trigger is started. If not, Start the trigger. For more information on Staring the project, see AWS Part 2 - Setting a AWS IoT Core connection.
Now you are ready to fire the trigger (NewTrigger) defined in AWS Part 2 - Setting a AWS IoT Core connection.
- In the Workbench, right click on the trigger and click Fire Trigger.
The trigger publishes the Hello World message to the MQTT client.

The section explains about subscribing to a MQTT Topic created in AWS Part 2 - Setting a AWS IoT Core connection. To subscribe to a topic, do the following:
- In the Workbench,
- Make sure the device is in the started state. If not, Start the device. For more information on Starting the device, see AWS Part 2 - Setting a AWS IoT Core connection.
- Make sure the project is started. If not, Start the project. For more information on Staring the project, see AWS Part 2 - Setting a AWS IoT Core connection.
- Make sure the trigger is started. If not, Start the trigger. For more information on Staring the project, see AWS Part 2 - Setting a AWS IoT Core connection.
Now you are ready to fire the trigger(NewTrigger2) defined in AWS Part 2 - Setting a AWS IoT Core connection.
- In the Workbench, right click on the NewTrigger trigger and click Fire Trigger. The NewTrigger2 is subscribed to the topic to which the NewTrigger is publishing.
The trigger publishes the Hello World message to the MQTT client.
As the NewTrigger2 is subscribed to the TestTopic, you will see the same message in the Reports. - Under Logs & Reports, click Reports.
- Expand the Event Notification and message.
The deviceWISE is now connected and is able to send and receive data.