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
gefragt vor 5 Monaten156 Aufrufe
1 Antwort
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
beantwortet vor 5 Monaten
profile picture
EXPERTE
überprüft vor einem Monat

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen