Only receiving last retained message when subscriber application restarted.
OS: Windows EMQ Broker version : 2.3.10 Eclipse paho
When I am publishing 10 messages on same topic, during that time for some reason subscriber application crashed, after sometime sub application restarted, I am getting only last retaining message only and losing all other data which is big problem.
I am putting Retained flag is true , clean session flag as false and Qos as 1 on both pub and sub.
can some one help on this. Am I missing any configuration or Erlang broker behaves like getting only last retaining message.
First, the MQTT broker will only hold the last message published to a topic with the retained flag for a given topic. Retained messages are not related to the queuing of high QOS messages for offline clients. For more details on retained messages I suggest you look at this post from HiveMQ
As for queuing messages for an offline client you need to meet all of the following points.
false
For more details about persistence and queued messages look at this other HiveMQ post.