multiple dynamic subscription per connection #2692
-
Hi, we have a use case where will have to dynamically create/remove multiple subscription based on the current steps that are executed in a workflow. My though is to create a connection and session with the OPC UA Server and create/remove subscription objects as when i need. There could be many concurrent subscription object will be created/removed My question is that is the create subscription SDK method is thread safe and also looking for input on any recommendation/guideline on implementing such functionality in a most performant way |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @vvn1677! |
Beta Was this translation helpful? Give feedback.
Hi @vvn1677!
I have the same problem too. I think that creating subscription is very expensive operation. In my solution I'm creating one subscription (with FastDataChangeCallback) and dynamically add/remove monitored items (with
subscription.ApplyChanges()
). Also I have a many items (around 100k), so I do it in batches (chunk by 10k items).