WS IoT MQTT Streaming — Can I Subscribe to Stream Topics on Server Side or MQTT Test Client?

Hi everyone,

I’m currently working on an MQTT streaming setup with FreeRTOS on my embedded device, using AWS IoT Core as the broker.

As part of my implementation, I’m using AWS IoT reserved MQTT topics for streaming data. The device publishes to topics like:

bash

CopyEdit

$aws/things/ThingName/streams/StreamId/get/payload-format
$aws/things/ThingName/streams/StreamId/data/payload-format

These work fine on the device side, but I want to monitor this streaming activity from the server side — or at least view the MQTT traffic using the MQTT test client on AWS IoT Core.


My Questions:

  1. Can I subscribe to these topics from the server, either using:
  • AWS IoT Core > Test > MQTT test client?
  1. Is there any restriction on viewing these reserved stream topics from clients that are not the originating device?
  2. Has anyone implemented server-side monitoring or logging of these streams/... topics?
  3. Any example or workaround to debug MQTT stream traffic in real time?

As described here, you should be able to subscribe to these topics.

What do you mean by “server” here? Do you mean to have another MQTT client, potentially running on a PC, and subscribe to stream topics. If so, I think you should be able to do so.

But when I do this:
AWS IoT Core > Test > MQTT test client
For example, I subscribe to:
$aws/things/ThingName/streams/StreamId/get/payload-format

I’m not seeing anything on the server side.
However, on the device side, I am able to receive the message.

Can you try changing MQTT payload display to binary?

Another thing worth confirming is that you are using the MQTT Test Client of the same region as the endpoint your device is connecting to. There are a couple of ways to check this:

  1. The region name shown on top right of the AWS console should match the region name in the endpoint e.g. xxxxxxxxxxxx[.]iot[.]ap-south-1[.]amazonaws[.]com is the end point for the ap-south-1 region.
  2. You can subscribe to $aws/events/presence/connected/# using the MQTT Test Client and connect your device to the broker. If the region is the same the test client will show a new connection at this topic.