Can a component in greengrassv2 receive a notification from a pre update applied to another component in the same deployment?

0

I need to know when an specific component is gonna be updated because it sends messages to IoT Core from files saved inside the folder of the same component. I was thinking use SubscribeToComponentUpdates for that, but my component is actually subscribed to topic so I can't receive another type of messages (supposedly). So I want to ask if is possible that another component could receive notifications when my component is gonna be updated and deferer the update and send the missings files.

已提問 1 年前檢視次數 212 次
2 個答案
0

my component is actually subscribed to topic so I can't receive another type of messages (supposedly)

You should be able to subscribe to local messages and to the ComponentUpdates in the same GGv2 component. Both events will be handled by different callback functions, maybe this tutorial helps: https://docs.aws.amazon.com/greengrass/v2/developerguide/defer-component-updates-tutorial.html

profile pictureAWS
專家
Jan_B
已回答 1 年前
0

Thanks for the answer! Does this mean that my component should be able to subscribe to local messages and ComponentUpdates at the same time? How could I do that if (as you say before) the events will be handled by different callback functions? Do I need one StreamHandler? I'm sorry but I can't see a solution for that.

Thanks again for the answer!

已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南