Hi Andre,
Thank you for the reply. The link that you have shared is a good source of information and I understand that PUBREC will be resent until the client replies with a PUBREL.
That part is clear.
But I have another question, will PUBREC be sent even after broker restart?
I mean broker keeps on sending PUBREC messages to client, but client does not reply with PUBREL. In between the broker gets stopped and started again. Will it send the PUBREC message again after restart?
Actually we are doing SOUP analysis of an mqtt client library that we are using in our project.
There is bug in the current version of the library that we are using, which can cause the following scenario,
1. Client does a PUBLISH message (QoS2) and disconnects from the server before getting the PUBREC
2. When the client connects back, due to a bug in the MQTT client library, there is a chance that the client library loses track of the message it has sent before disconnection.
3. In that case, if the client gets a PUBREC for that message, it will simply ignore it.
So no matter how many times the broker sends PUBREC, client wont send back PUBREL.
In such a scenario, I wanted to know how long the VerneMQ broker will keep the message in its db and how long it will keep on sending PUBREC.
Is there a timeout or message expiry mechanism present?
Thanks & Regards
Ujesh Mohanan