How to republish GetStream messages to a new topic using IoT Core rule

0

I'm trying to extract mqtt messages from the $aws/things/+/streams/+/data/json topic and republish it to a new topic such as devices/data. The SQL statement I have in the rule is: SELECT * FROM '$aws/things/+/streams/+/data/json'. I'm able to receive messages on the topic I want to republish, but for some reason those messages are not being republished to a new topic I defined in the rule. The rule works if you change the reserved topic to some other non-reserved topic. What am I missing to get this to work?

hkaiser
asked 3 months ago135 views
1 Answer
0

Hi. As far as I know, the streaming topics are not published to the broker, and are only published to the device that is downloading from the stream. In other words, only the client that publishes the stream/get message can receive the stream blocks.

Why are you attempting this?

profile pictureAWS
EXPERT
Greg_B
answered 3 months ago
  • I am developing a fleet management solution in my own back-end that interacts with the devices. But I found another solution where I can just fetch the file from s3 and publish the chunks to another non-reserved topic. Now I've run into the same problem with the $aws/things/thingName/jobs/notify and $aws/things/thingName/jobs/notify-next reserved topics. I can only listen for those changes via MQTT on the device side which will prevent me from creating an IoT rule with those reserved topics as well. Any suggestions on what I should do to get around this limitation?

  • I don't understand why your cloud application should need to subscribe to these topics. You must have some requirement that I'm not comprehending. Why would you fleet management solution not just use jobs and/or MQTT file streams as designed? Please elaborate.

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