I develop a client implementation using Eclipse Milo 0.6.10 to connect small industrial devices. When the client gets disconnected and the server does not realise it, the reconnect results in lots of warnings about “no request for the received response” and missing updates for the subscription.
WARN [UascClientMessageHandler.java:659] – No pending request with requestId=55 for PublishResponse
WARN [UascClientMessageHandler.java:659] – No pending request with requestId=56 for PublishResponse
Only first few updates directly after the reconnect show up. As there are requests answered, the onSubscriptionTransferFailed is not trigerred.
I guess it is the server, which is out of sync with the ID’s. Is there a way to recognize this and realign client and server?
At the moment I recreate the subscription every time we have a reconnect, because the only way to find out if the subscription still works is to take a look when the data change.
I use a SubscriptionListener to catch SubscriptionTransferFailed and a SessionActivityListener to get the dis- and reconnect events.
Recreating the subscription when the reconnect occurs works, but I guess it is not the best solution to the problem.
Thanks in advance for your help!
AKR MOBIL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.