Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [milo-dev] OPC subscribe many values - best practice

Thomas,

It sounds like when you divide up your list of items into smaller chunks you are also creating a new subscription for either each item or each chunk, which would explain why the server eventually complains that there are too many subscriptions.

It depends on the server, but I would expect that 50,000 monitored items belonging to a single subscription is okay unless otherwise indicated by the server's documentation (or you start getting Bad_TooManyMonitoredItems in response to creating an item).

You may find the new higher-level ManagedSubscription and ManagedDataItem APIs easier to use as well. 
Support for "chunking" item creation is something I should add support for in these new APIs. It already handles chunking bulk modifications, so doing that during item creation seems reasonable. ManagedSubscription has a handful of overloads for creating multiple monitored items at once. I have started to write documentation for the client in the wiki: https://github.com/eclipse/milo/wiki/Client#subscriptions. At this point, though, you would still need to "chunk" these up yourself.

There is generally no reason to have multiple OpcUaClient instances connected to the same endpoint. Most limitations you might run into re: subscription or item counts are global, not per session, and you are unlikely to evade them by using multiple client connections.

On Wed, Oct 28, 2020 at 7:12 AM Edhag Thomas <Thomas.Edhag@xxxxxxx> wrote:

Hi!
  I'm quit new to this OPC communication concept. During a couple of weeks I have tried things out with the Milo-api, read the milo-examples, searched the internet for more examples and best practices...but I still have some questions and some unresolved problems to figure out.

In my context, I'm trying to subscribe to about 50000 different data values (parameters) from the same endpoint. The data values origin from two main branches in the end point server node-tree.
Current main opc-workflow:
- Create (one) OpcUaClient and connect
- using the client to browse recursively for parameters in the first node bransch
- using the client to browse recursively for parameters in the second node bransch
- Merging all parameters to one big list of all available parameters
- using the client to set up (one) UaSubscription and create MonitoredItemCreateRequest for all available parameters
- subscribe...

I should probably also mention that I don't have access to the configuration and setup of the opc end point.

Some problems I have experienced:
- If the parameter list is too long the OPC-client will throw;
  Caused by: UaException: status=Bad_TcpMessageTooLarge, message=message size exceeds configured limit: 3713273 > 2097152
- If I divide the list of parameters to smaller chunks and create MonitoringItems for each chunk, the server throws:
  Caused by: UaServiceFaultException: status=Bad_TooManySubscriptions, message=The server has reached its maximum number of subscriptions

Some of my questions are;
- What are some best practices to set up subscriptions for a very large number of values?
- Should I try to use more than one OpcUaClient to the same end-point?
- or should I try to set up several UaSubscription on the same OpcUaClient?

And some wishes...
- There are a lot of information regarding the milo-opc, but to me it's quite fragmented over the internet and in this mailing list. I wish some of the information could be collected and written into the README.md file or in the examples at github.

,regards
Thomas

_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev

Back to the top