exclude metadata from the topic when using the standard MQTT topics for shadow operations

0

$aws/things/thingname/shadow/name/myshadow/get This get shadow returns the complete payload along with the metadata. Which is useless for me and its also increases the size of the payload. How can I exclude metadata from the payload?

{ "metadata": { "desired": { "welcome": { "timestamp": 1699338422 }, "OS": { "timestamp": 1699989143 }, "LS": { "timestamp": 1699338423 }, "CV": { "timestamp": 1699989143 }, "MQ": { "timestamp": 1699989143 } }, "reported": { "welcome": { "timestamp": 1700744111 }, "LS": { "timestamp": 1700580432 }, "OS": { "timestamp": 1699988362 } } } }

Taha
asked 4 months ago146 views
1 Answer
0

Hello,

Inorder to reduce the size of shadow messages sent to your device, define a rule that selects only the fields your device needs then republishes the message on an MQTT topic to which your device is listening. Please refer the below documentation which mentions the same:

[+]. https://docs.aws.amazon.com/iot/latest/developerguide/iot-device-shadows.html#device-shadow-trim-messages

Thanks

AWS
answered 4 months ago
profile picture
EXPERT
reviewed 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