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
已提问 5 个月前156 查看次数
1 回答
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
已回答 5 个月前
profile picture
专家
已审核 1 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容