Misc UaSubscription Questions #1531
Replies: 1 comment
-
No, all that matters is they uniquely identify a MonitoredItem within the context of a Subscription. The client handle is the key used to identify the MonitoredItem a notification from the server belongs to.
No, if the client is properly shut down (OpcUaClient::disconnect) the Session is closed, and the CloseSessionRequest is sent with the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
// (milo 0.6.16)
artifacts = [
"org.eclipse.milo:sdk-client:0.6.16",
"org.eclipse.milo:stack-core:0.6.16",
"org.eclipse.milo:stack-client:0.6.16",
],
Question 1: Is the sequencing of client handles important? i.e. Does it make a speed/memory difference on the client side if I use what would appear to be unordered handles versus a monotonic list of integers? I have some "legacy" code to generate client handles that stuffs 2 bytes and a short into the handle.
I used to unpack this client handle in the
ValueConsumer
onValueArrived
callback to know where to dispatch the data, and used it as a hashtable key for dispatching subscriptions because I thought that hash collisions were causing problems with using NodeId as a hashtable key directly (but turns out I just didn't fully understand how Java handles duplicate hashes in its Map implementations). Currently considering eliminating this path for generating client handles and just usingUaSubscription::nextClientHandle
, but wondering if it even matters...Question 2: Is it necessary to manually cleanup subscriptions when I close the client connection? I am wondering if my shutDown sequence is redundant:

Beta Was this translation helpful? Give feedback.
All reactions