Comments (2)
To the best of my understanding, message sequence number resets to 0 each time you need to publish NBIRTH and goes up by one for all other messages. The bdSeq (which is optional) is supposed to go up by one each time a client connects to a broker, meaning if you publish multiple NBIRTH messages during the same session that they will all have the same bdSeq. Ideally, a client would retain its bdSeq number eternally and increment by one each new TCP session. The goal of the bdSeq is to allow easier tracking of lost connections, and matching NDEATH messages to NBIRTH, but a client can only setup the NDEATH once at the beginning of a session in the WILL of the CONNECT.
from sparkplug.
@jbrzozoski is correct
The "seq" number is used for sequencing all messages published by a Sparkplug client application and resets to 0 upon a new NBIRTH message.
The "bdSeq" number is used to match NDEATH messages with their corresponding NBIRTH message. They are only incremented when a new session is established and a new NBIRTH is published. One reason for this is because it is possible (in some client/server implementations) for an NDEATH (published as an LWT by the MQTT server) of a disconnected client to be delivered after the client has already reconnected and published a new NBIRTH. The receiving application should compare the "bdSeq" number of the NDEATH with the "bdSeq" number of the last NBIRTH that was received to see if it represents the "death" of the current session, or if it was for a past session.
Also, the project has been moved. Please post future questions and discussion here https://github.com/eclipse/tahu
from sparkplug.
Related Issues (15)
- too much debug HOT 2
- Segmentation fault while execute using shared library not in static library on iMx28. HOT 1
- missing returns at the end of non-void functions HOT 1
- The C library message decoder does not properly decode messages from an Iginition instance HOT 1
- Python print statement syntax needs to be updated HOT 1
- node-red-contrib-sparkplug not possible to send DDEATH HOT 1
- nodered example is not updated to current sparkplug_b.proto file
- Oneof value inside metric
- SparkplugRaspberryPiExample: clarification about the bdSeq HOT 2
- Does the DDEATH message contains a payload or not? HOT 2
- Specification parkplugB: clarification about the figure 4 HOT 2
- Memory leaks and other issues reported by valgrind HOT 1
- decode_payload does not work HOT 1
- segmentation fault running example.c running on linux ARM9 platform HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sparkplug.