I am using the MQTT distributor, MQTT engine and MQTT transmission modules and I have the following question. I can’t find where to configure retain = True so that in case of disconnection from an MQTT client and subsequent reconnection, it receives the current values of all the topics to which it is subscribed that have changed during the time it remained disconnected. On the other hand, when the client disconnects, due to a network problem for example, and the causes that caused the disconnection disappear, the client does not automatically reconnect. The only way I have found to reconnect is through the Rebirth tag present in the node and device control folders. Is there a way to automatically reconnect the client?
I see you’ve posted a question into Support already. I’ll answer the question here and in the Support queue. If you have follow up questions please ask in the Support thread.
We do not have an option to set published messages with the retain flag set to True. Only the LWT (Death) message uses this setting.
Regarding the disconnecting reconnecting moments depending on which client disconnects last you might not see Tags go Good until the next Tag change, or you do a Refresh or Rebirth as you mentioned. This is especially true if Transmission goes offline while Engine is online. Engine will set the Tags to Stale. But if Engine then looses connection and Transmission reconnects Engine will not see the Birth messages from the Edge.
If Engine then reconnects this client will not know that status until the next Tag change or Birth.
One tool we offer is the Primary Host ID (PHID) feature. Add a PHID at Engine then at Transmission and the STATE of the connection will be published with each connect/disconnect and Engine will update the Tag status accordingly.