-
Notifications
You must be signed in to change notification settings - Fork 960
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
Enable Durable Subscriptions #2978
base: master
Are you sure you want to change the base?
Conversation
* [Server] Durable Subscriptions (OPCFoundation#2683) * Implement a system test for DurableSubscriptions (OPCFoundation#2839) * Client Side Co-authored-by: ALTERNATE-DEV\Archie <[email protected]>
Libraries/Opc.Ua.Server/Subscription/MonitoredItem/Queue/EventMonitoredItemQueue.cs
Outdated
Show resolved
Hide resolved
Libraries/Opc.Ua.Server/Subscription/MonitoredItem/Queue/EventMonitoredItemQueue.cs
Outdated
Show resolved
Hide resolved
Libraries/Opc.Ua.Server/Subscription/MonitoredItem/Queue/EventMonitoredItemQueue.cs
Outdated
Show resolved
Hide resolved
{ | ||
if (discardOldest) | ||
{ | ||
m_events.RemoveRange(0, m_events.Count - (int)queueSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a LinkedList will handle removal from beginning and the end with the same complexity ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this case comes not often enough to make this worthwile, benchmarking woudl be necessary:
https://stackoverflow.com/questions/5983059/why-is-a-linkedlist-generally-slower-than-a-list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments
Proposed changes
With this change the server library allows user to provide own durable Notification & Event Queues to make the server support durable subscriptions.
As an example the reference Server provides custom queues and enables durable subscriptions with a limited lifetime using in memory queues.
Co-authored-by: ALTERNATE-DEV\Archie [email protected]
Types of changes
Checklist
Further comments