After subscribing to an MQTT topic (that may include wildcards), is there a way to know for sure that all retained messages for the subscribed topics have been received?
(to be more accurate : all messages that were stored retained message at the broker at the moment of subscription)
If there is no direct way, is there any hack to know it (like sending a new retained message with specific QoS to a subscribed topic, that is for sure received after older messages) ?
Background of my question is this feature request (https://github.com/marvinroger/homie-esp8266/issues/313) that I want to implement.
So this would be the reference implementation for arduino (ESP8266) with the AsyncMQTT library, but my question is valid in general for other implementations, too (eg using paho-mqtt etc.).