Subscription Sequence Number

Questions regarding the use of the UaExpert.

Moderator: uaexpert

Post Reply
ngoossens
Jr. Member
Jr. Member
Posts: 2
Joined: 23 Sep 2015, 08:42

Subscription Sequence Number

Post by ngoossens »

Hi All,

I have recently been working with the open source open62541 OPC UA server and using UaExpert for testing. During these tests I enabled the stack trace and got a number of errors about the sequence number being out of sync as shown in the screenshot below.

After logging an issue with open62541 and digging into the code it seems that UaExpert is sending publish requests outside of the publish interval and not always handling the keepalive sequence number correctly. This only happens with the current version (1.3.1) and not the older 1.2.2 version. Is this a regression in UaExpert, or should open62541 handle thing differently?

Full details on the issue and the investigation can be found here: https://github.com/acplt/open62541/issues/417

Image

Thanks in advance for the assistance.

Nick

User avatar
Support Team
Hero Member
Hero Member
Posts: 3072
Joined: 18 Mar 2011, 15:09

Re: Subscription Sequence Number

Post by Support Team »

Hi,

the problem is that open62541 doesn't handle asynchronous messages, as admitted in https://github.com/acplt/open62541/issues/417.

The UaExpert, or better the underlying C++ based OPC UA Client SDK, which handles publish notifications, sends multiple Publish Requests to the server. This feature is by design, this is not a bug.

OPC UA is an asynchronous protocol, not a ping-pong protocol like HTTP, where one waits for the response before sending the next request.
In OPC UA a server can only send "events" (datachange or event notifications) by first getting a publish request. To avoid latencies when many subscriptions have data ready or a lot of alarms need to be sent it would be inapplicable if the server needs to wait until getting the next publish request.
For this reasons a client sends multiple publish requests. These get stored in the server's publish queue. So whenever the server wants to send notifications it dequeues a publish request context and sends the according response without any delay.
This seems to be completely missing in open62541 yet.

This behaviour is described in OPC UA Spec Part 4, Section 5.13.1 - Subscription Model.

I hope this helps understanding the issue.

>> UAExpert does not respect the publishinterval it set. Instead, it floods the server with publishRq.
This is wrong. The publishing interval has nothing to do with the client. The server should not send publish responses for a subscription faster than this interval.
There is no time constraint for publish requests, also one publish request is used for polling multiple subscriptions. It is a mass operation. So this would not make sense anyway.

Regards,
Unified Automation Support Team

ngoossens
Jr. Member
Jr. Member
Posts: 2
Joined: 23 Sep 2015, 08:42

Re: Subscription Sequence Number

Post by ngoossens »

Hi

Thanks for the response. I will relay the feedback to the open62541 team and see what the next steps are.

Regards,
Nick

jpfr
Jr. Member
Jr. Member
Posts: 3
Joined: 11 May 2016, 09:28

Re: Subscription Sequence Number

Post by jpfr »

The described behaviour occured in a non-released development branch of open62541.

Async subscriptions have now been implemented and the behaviour is conformant to the official testing tools.
Subscriptions/MonitoredItems for datachange monitoring will thus be supported in the next release.

Note that open62541is still in the zero-dot-release phase.
We recommend using a commercial SDK for mission-critical use cases.

Post Reply