跳至內容

Pricing for IoT Core MQTT Retained Messages

0

Are there any extra charges for retained messages using the MQTT API? Do you pay for the number of message units you have retained? How long will IoT core retain the message?

The documentation says:

Publishing messages with the RETAIN flag set from a client, by using AWS IoT console, or by calling Publish incurs additional messaging charges described in AWS IoT Core pricing - Messaging.

but the IOT Core Pricing page does not provide details on additional cost for retained messages.

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

Hi. The additional pricing details are here: https://aws.amazon.com/iot-core/pricing/additional-details/#MQTT_Message_Metering

The retention period depends on the MQTT version: https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html#mqtt-retain

In MQTT 3, retained messages do not expire. They are stored until they are replaced or deleted. In MQTT 5, retained messages expire after the message expiry interval you set. For more information, see Message Expiry.

MQTT5 message expiry: https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html#mqtt5-message-expiry

AWS
專家
已回答 1 年前
專家
已審閱 1 年前
專家
已審閱 1 年前
  • "For MQTT inbound messages published with the RETAIN flag, your account would be metered for inbound MQTT PUBLISH and for MQTT RETAINED" Is this basically saying that publishing with retain=True doubles the cost of each publish?

  • Yes, that is correct.

0

Publishing an MQTT message with the RETAIN flag set to true does effectively double the messaging cost for that publish operation. When the RETAIN flag is used, your account is metered and charged for:

  • The normal inbound MQTT PUBLISH message
  • An additional MQTT RETAINED message charge for storing the retained message

So publishing a retained message incurs both the regular PUBLISH charge as well as an extra RETAINED message charge.

AWS
專家
已回答 1 年前

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

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