Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [milo-dev] Recovering from a network disconnection

I just merged this PR for 1.0.5: https://github.com/eclipse-milo/milo/pull/1575

It simplifies the logic for dealing with `onStatusChanged` and `onTransferFailed` callbacks. 

With 1.0.5, for these callbacks, you should be able to keep/reuse the existing OpcUaSubscription instance and just call `create()` and then `synchronizeMonitoredItems()`.

For `onWatchdogTimerElapsed` I'd recommend `delete()`, then `create()`, then `synchronizeMonitoredItems()`. 

On Wed, Aug 27, 2025 at 6:02 AM Kevin Herron <kevinherron@xxxxxxxxx> wrote:
Should I first remove all monitoredItems from the original subscription before re-creating it?

Should not be necessary. The Subscription is presumably gone from the Server at this point.


When I get the onWatchdogTimerElapsed() call back should I make another attempt at re-creating the subscription?

Probably - but if you do, you should try to delete the Subscription first. When the watchdog timer expires it means we haven't received a PublishResponse for that Subscription in the expected amount of time (plus generous grace period). It means something may be wrong with the Server or Subscription.

If this is something you can reproduce easily it would be great to have a Wireshark capture so I can make sure there's no issue on the Client side. 


On Tue, Aug 26, 2025 at 10:11 PM Burtenshaw, John via milo-dev <milo-dev@xxxxxxxxxxx> wrote:
Hello,

I am using milo 1.0.3 and would like to know the best course of action after a network failure.  The sequence of events I observed for the network drop are  as follows:

  1. SessionActivityListener callback  onSessionInactive() 
  2. SessionActivityListener callback onSessionActive()
  3. SubscriptionListener callback onStatusChanged() with status=StatusCodes.Bad_Timeout

At this point I attempted to re-create the subscription  after which I got a onWatchdogTimerElapsed() callback.  A couple of questions:
  1. Should I first remove all monitoredItems from the original subscription before re-creating it?
  2. When I get the onWatchdogTimerElapsed() call back should I make another attempt at re-creating the subscription?

Your help/advise would be appreciated.

Kind regards


John Burtenshaw




This e-mail message is confidential and is intended only for the person(s) named above. If you have received this message in error, please notify the sender immediately and delete/remove it from your computer system. Any reading, distribution, printing or disclosure of this message is strictly prohibited if you are not the intended recipient of this message. Neither this information block, the typed name of the sender, nor anything else in this message is intended to constitute an electronic signature unless a specific statement to the contrary is included in this message.
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev

Back to the top