Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DatasetMessage SequenceNumber is not being incremented in 2.9.0 (preview) #1961

Closed
quality-leftovers opened this issue Mar 17, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@quality-leftovers
Copy link
Contributor

quality-leftovers commented Mar 17, 2023

Describe the bug
In the current version of the publisher (master) the SequenceNumber of each DatasetMessage re-starts with 1 in each NetworkMesage. I'd expect the SequenceNumber to be incremented accross NetworkMessages, like in previous publisher versions.

NetworkMessage.GenerateSampleSubscriptionNotifications seems to set SequenceNumber to index of DatasetMessage in NetworkMessage.

To Reproduce
Publish OPC UA PubSub Json using publisher to any sink

// NetworkMessage 0
{
    "MessageId": "...",
    "MessageType": "ua-data",
    "PublisherId": "opc.tcp://MySample:12345",
    "DataSetWriterGroup": "MySample",
    "Messages": [
        {
            "SequenceNumber": 1,
            "...": "..."
        }
    ]
}
// NetworkMessage 1
{
    "MessageId": "...",
    "MessageType": "ua-data",
    "PublisherId": "opc.tcp://MySample:12345",
    "DataSetWriterGroup": "MySample",
    "Messages": [
        {
            "SequenceNumber": 1, // <- 1, again. Expected: 2
            "...": "..."
        }
    ]
}

`` 


**Expected behavior**
Generate SequenceNumber based on "counter" for each DatasetWriter (

**Screenshots**
n.a.

**Desktop (please complete the following information):**
n.a.

**Smartphone (please complete the following information):**
n.a.

**Additional context**
n.a.
@marcschier marcschier self-assigned this Mar 27, 2023
@marcschier marcschier added bug Something isn't working OPC Publisher labels Mar 27, 2023
marcschier added a commit that referenced this issue Apr 28, 2023
# Changes introduced:

- New Namespaces for all projects and simplified code structure. There are now 2 SDK projects, one for the OPC Publisher module, and another for the optional cloud WebAPI companion service. 
- Ability to run platform (modules, services) "standalone" on the edge #464
  - [OPC Discovery] has been included into the OPC Publisher module, the container name must be updated to refer to OPC Publisher. 
  - [OPC Discovery] A new synchronous FindServer API has been added to allow discovery by discovery url through a single API call.
  - [OPC Twin] has been included into the OPC Publisher module, the container name must be updated to refer to OPC Publisher. 
  - [OPC Twin] we removed the Activate and Deactivate calls. 
  - [OPC Twin] OPC TWIN Method call #996
  - Support for opc-twin module api direct method calls with input arguments (not requiring OPC Twin micro services) #1512
- Support for a new TestConnection API to test a connection to a server and receiving detailed error information back.
- [OPC Publisher] (breaking change) The publisher id in each message is now always the same value across all writer groups rather than previously where a random guid was used per writer group when a publisher id was not configured.
- [OPC Publisher] Several bug fixes for preview 1 (#1964)
  - [OPC Publisher] DatasetMessage SequenceNumber is now correctly incremented (preview) (#1961)
- [OPC Publisher] Enabling using DisplayNames defined for the event fields in pn.json as keys in the payload of dataset messages (#1963)
- [OPC Publisher] Request opc server's nodes information #1960
- [OPC Publisher] dotnet publish can be used to build a docker container for OPC Publisher #1949
- [OPC Publisher] Metrics output and log output showing number of sessions currently active (related to #1923)
- [OPC Publisher] Added new OPC UA stack which addressess #1937 and latest CVE's
- [All micro services] Have been combined into a single WebAPI with the same resource paths as the 2.8 AKS deployment and all-in-one service. 
  - [OPC Registry service] Supervisor, Discoverer entities have been removed, but the API has been layered on top of the publisher entity for backwards compatibiltiy. Do not use these API's anymore. 
  - [OPC Registry service] A new RegisterEndpoint API has been added that calls the new sync FindServer API and adds the result into the registry in one call.
  - [Telemetry processor] The telemetry and onboarding processors have been integrated into the WebAPI, but only forwards to SignalR. The secondary event hub has been removed. If you need to post process telemetry you must read telemetry data directly from IoT Hub.
- Document the diagnostics output and troubleshooting guide #1952

# Stats:

*  Consolidated down to 1 edge module and 1 optional cloud companion web app.  
*  Maintained 99% of API and even added new capabilities/functionality such as Event and MQTT broker support.
*  Reduced LOC for shipped binaries by 53% from to 641844 in 2.8.6 to 297144 in 2.9.0 preview 2
*  Increased Test coverage (blocks) by around 50% from 51.34% to 76.36%
@marcschier
Copy link
Collaborator

This was fixed in 2.9.0-preview2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants