By using AWS re:Post, you agree to the Terms of Use
/Overview of active topics in IoT Core/

Overview of active topics in IoT Core


I'm trying to find a list of active topics in our account. During testing it's very difficult to understand what devices are publishing to which topics and how often. Worse, a device could be publishing to a random topic and could be billing for messages we can't find.

It's a feature we've used heavily in other MQTT brokers like EMQX & HiveMQ.

I think it would be a very useful feature to have a topic overview where all topics recently used in the broker are listed along with their volume of use. This would be especially useful for debugging topics when trying to define an application-wide topic schema.

Perhaps there is a way to do this already?

1 Answers
Accepted Answer

Hi. One way is to enable AWS ioT Logging. Then use CloudWatch Logs Insights to query the AWSioTLogsV2 log group with a query like this (over whatever timeframe you want to check):

fields @timestamp, @message
| filter eventType = 'Publish-In'
| stats count(*) by topicName

This will give you a list of every topic during that timeframe and the number of messages published to each topic.

answered 25 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions