-ms and -si parameters in OPC Publisher


I am collecting data from OPC Server via OPC Publisher onto to IoT hub
I need to collect data at 20s frequency and set OpcPublishiNterval as 20000 in PublishedNode.json as shown below

    "Id": "ns=3;i=1008",
    "DisplayName": "F101A",
    "OpcPublishingInterval": 20000

It works fine and I get messages every 20S on IoT hub
But I wish to consolidate the content in each message so the message is sent out by publisher only when it reaches 4Kb limit as standard Azure message is 4Kb and subscription is based on no of messages sent every day

So i set the -ms =4096 while running the publisher . set -si =0 as shown below
"Hostname": "publisher",
"Cmd": [
"HostConfig": {
"Binds": [

However get this error for any value set for ms other than 0

[10:20:56 WRN Microsoft.Azure.IIoT.OpcUa.Protocol.Services.DefaultSessionManager] Failed to create session 'b2c224f8eaa44c2bc65884d1d546a9a378e1771c' due to One or more errors occurred. (BadRequestTimeout) [10:21:06 INF Microsoft.Azure.IIoT.OpcUa.Protocol.Services.DefaultSessionManager] Creating session 'b2c224f8eaa44c2bc65884d1d546a9a378e1771c' for endpoint 'opc.tcp://ip-172-31-79-206.ec2.internal:53530/OPCUA/SimulationServer'...

Also tried changing -ct option as error was on create session timeout -but that did not resolve the issue either

Any help is appreciated


Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
406 questions
{count} votes