Milo client v0.5.2 (same with current v0.6.8) is connected to the opcua server, I restart the server and the milo client reconnects successfully but the subscriptions are lost, so I'm attempting to recreate them by onSessionActive listener.
I even do a getSubscriptionManager().clearSubscriptions() before getSubscriptionManager().createSubscription(scanRate). The createSubscription method ends up with a null Future. So it does not even give an exception, the code execution seems to stop and not return from there and so the invocation to recreate the monitoring subscriptions won't work.
onTransferFailed occures multiple times and I would reestablish the subscriptions for all, so it would be more convenient to call at onSessionActive which is after the onSubscriptionTransferFailed events. Anyway the client.getSubscriptionManager().createSubscription(scanRate) behaves the same way when calling at onSubscriptionTransferFailed: the code execution doesn't return and subscriptions are not made. This is triggered in the first onSubscriptionTransferFailed and no subsequent onSubscriptionTransferFailed events are occuring.
If providing some values of the milo client at onSubscriptionTransferFailed or other point, I could help to better grasp the issue.
My main issue is this full reconnection where the subscriptions are lost and has to be reestablished. There is no way to reinitialize the failed subscription monitors without recreating the subscriptions but that seems to break the Milo client's FSM machinery.
How to go about this problem now?
You should be re-creating them in the
SubscriptionListener::onSubscripionTransferFailedcallback.