Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [milo-dev] issue - eclipse milo: subscription stops receiving updates about data change

Hello,

> is there a way to check if the subscription is actually alive (i am not quite sure when i must receive   ?org.eclipse.milo.opcua.sdk.client.api.subscriptions.UaSubscriptionManager.SubscriptionListener#onKeepAlive)   ?

I think if you can use Wireshark or enable DEBUG-level logging for OpcUaSubscriptionManager you can verify that PublishRequests are still being sent. If you see PublishRequest/PublishResponse but are not receiving data changes then something might be wrong with he server.

> is there a way to force server to send current values of subscription ?

Yes, you can call the ResendData method on the server with all of your subscription ids.

> is there a way to handle (be informed at least) regular heartbeats between client and server ?

Adding a SubscriptionListener to OpcUaSubscriptionManager will allow you to get notified keep-alive responses, but those will only occur in the absence of data changes.

You will also get notified of any status changes via this listener, e.g. if the subscription timed out for some reason you should get notified via onStatusChanged().

If you update to version 0.3.x there’s also a built-in keep-alive as part of the SessionFsm as well, via reading the server time/state, but it doesn’t really have anything to do with subscriptions. It just keeps the session alive for you when there’s no activity instead of requiring you to do that yourself. In your case, though, having subscriptions means there should be PublishRequests and those are enough to keep a session alive.


On Aug 8, 2019, at 2:15 AM, Lenovo K3 Owner <lenovo.k3.1.owner@xxxxxxxxx> wrote:

I have java application that makes the connection to zenon opc ua server using eclipse milo and subscribes for data changes for some set of nodes.

 - sdk-client used version is 0.2.5  

In general, all works nice.

But sometimes I observe error case when I stop receiving updates from the server at all (neither OK nor BAD nor UNCERTAIN).

I have no errors reported by milo (using UaSubscriptionManager.SubscriptionListener).

And client connection is alive (I can read any nodes involved in subscription using :

client.getAddressSpace().getVariableNode(nodeId).get().readValue().get();

From the zenon side I see changes of nodes using uaExpert, but as I said no updates on eclipse milo client side.

my questions are:

  1. what can be a possible reason?
  2. is there a way to check if the subscription is actually alive (i am not quite sure when i must receive   ?org.eclipse.milo.opcua.sdk.client.api.subscriptions.UaSubscriptionManager.SubscriptionListener#onKeepAlive)   ?
  3. is there a way to force server to send current values of subscription ?
  4. is there a way to handle (be informed at least) regular heartbeats between client and server ?
Thanks in advance


_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/milo-dev

Back to the top