- Newest
- Most votes
- Most comments
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
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.
Relevant content
- asked 4 years ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
"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.