is it possible to set retain flag to true on "Republish to AWS IoT topic" iot core rule

0

Hi,

is it possible to set retain flag to true on "Republish to AWS IoT topic" iot core rule?

Kimi
已提問 6 個月前檢視次數 161 次
1 個回答
0

As per my knowledge, the AWS IoT Core rule action "Republish to an AWS IoT topic" in the IoT Core Rule Engine does not support setting the "retain" flag directly. The "retain" flag is used to indicate whether a message should be retained by the broker and sent to any new subscribers that match the topic.

The rule action "Republish to an AWS IoT topic" in AWS IoT Core allows you to republish the incoming message to a different topic, but it doesn't provide explicit options for configuring the "retain" flag.

If you require more granular control over the "retain" flag, you might need to use a different approach. One common method is to use a Lambda function as a rule action to perform custom processing and republish the message to the desired topic, setting the "retain" flag as needed.

AWS
已回答 6 個月前

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

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

回答問題指南