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

Issues with sequence number increments in multithreaded code #100

Open
adaptivefrog opened this issue Jun 12, 2024 · 1 comment
Open

Issues with sequence number increments in multithreaded code #100

adaptivefrog opened this issue Jun 12, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@adaptivefrog
Copy link

When sending node device data messages from a from different threads, there is a risk of sending several data messages with same sequence number.

Typical example: Each "device" is managed in it's own thread. If they send data messages at the same time, they might send data messages with the same sequence number. The chance of this to happen increases with the device activity.

I can see the issue in the SparkplugNodeBase.PublishMessageForDevice method.

@SeppPenner SeppPenner self-assigned this Jul 2, 2024
@SeppPenner SeppPenner added the enhancement New feature or request label Jul 2, 2024
@SeppPenner
Copy link
Owner

This is true as the code isn't threadsafe. I didn't think it was required to be, but if there is a use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants