Table of Contents

KNet for OPC (KNetOPC): configuration

The configuration is based on a Json file described from the following schema:

{
  "title": "Root KNet for OPC Configuration",
  "description": "The configuration used to describe how KNet for OPC shall work.",
  "definitions": {
    "KafkaConnectParameters": {
      "title": "Default ConnectParameters",
      "description": "The KafkaConnectParameters parameters associated to this specific SubscriptionConfiguration. If not set the value is inherited from the GlobalConnectParameters",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "Topic": {
          "title": "Apache Kafka topic",
          "description": "The topic where the data will be written.",
          "type": [
            "string",
            "null"
          ]
        },
        "Partition": {
          "title": "Apache Kafka partition",
          "description": "The partition where the data will be written, if not set the connector will use the partition strategy set at higher level.",
          "type": [
            "integer",
            "null"
          ]
        },
        "AbsoluteNodeIdInKey": {
          "title": "Absolute NodeId In Key",
          "description": "If set to true then the key reports the ExpandedNodeId, otherwise the key reports only the NodeId.",
          "type": "boolean"
        },
        "UseServerTimestamp": {
          "title": "Use Server Timestamp",
          "description": "If set to true then the timestamp of the record uses the ServerTimestamp of the notified change, otherwise the record uses the ClientTimestamp of the notified change.",
          "type": "boolean"
        },
        "EncodingType": {
          "title": "Encoding Type",
          "description": "Can be set to 0 (\"Binary\", 1 (\"Xml\") or 2 (\"Json\") and inform the connector how to convert the notification before send it to Apache Kafka Connect. Default value is Json.",
          "type": "integer",
          "enum": [
            0,
            1,
            2
          ]
        }
      }
    },
    "KafkaConnectParameters-1": {
      "title": "Kafka Connect Parameters",
      "description": "The KafkaConnectParameters parameters associated to this specific MonitoredItemConfiguration. If not set the value is inherited from the SubscriptionConfiguration",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "Topic": {
          "title": "Apache Kafka topic",
          "description": "The topic where the data will be written.",
          "type": [
            "string",
            "null"
          ]
        },
        "Partition": {
          "title": "Apache Kafka partition",
          "description": "The partition where the data will be written, if not set the connector will use the partition strategy set at higher level.",
          "type": [
            "integer",
            "null"
          ]
        },
        "AbsoluteNodeIdInKey": {
          "title": "Absolute NodeId In Key",
          "description": "If set to true then the key reports the ExpandedNodeId, otherwise the key reports only the NodeId.",
          "type": "boolean"
        },
        "UseServerTimestamp": {
          "title": "Use Server Timestamp",
          "description": "If set to true then the timestamp of the record uses the ServerTimestamp of the notified change, otherwise the record uses the ClientTimestamp of the notified change.",
          "type": "boolean"
        },
        "EncodingType": {
          "title": "Encoding Type",
          "description": "Can be set to 0 (\"Binary\", 1 (\"Xml\") or 2 (\"Json\") and inform the connector how to convert the notification before send it to Apache Kafka Connect. Default value is Json.",
          "type": "integer",
          "enum": [
            0,
            1,
            2
          ]
        }
      }
    },
    "KafkaConnectParameters-2": {
      "title": "Global KafkaConnectParameters",
      "description": "A global value for KafkaConnectParameters can be set. Default is not set and inherits default values from KafkaConnectParameters.",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "Topic": {
          "title": "Apache Kafka topic",
          "description": "The topic where the data will be written.",
          "type": [
            "string",
            "null"
          ]
        },
        "Partition": {
          "title": "Apache Kafka partition",
          "description": "The partition where the data will be written, if not set the connector will use the partition strategy set at higher level.",
          "type": [
            "integer",
            "null"
          ]
        },
        "AbsoluteNodeIdInKey": {
          "title": "Absolute NodeId In Key",
          "description": "If set to true then the key reports the ExpandedNodeId, otherwise the key reports only the NodeId.",
          "type": "boolean"
        },
        "UseServerTimestamp": {
          "title": "Use Server Timestamp",
          "description": "If set to true then the timestamp of the record uses the ServerTimestamp of the notified change, otherwise the record uses the ClientTimestamp of the notified change.",
          "type": "boolean"
        },
        "EncodingType": {
          "title": "Encoding Type",
          "description": "Can be set to 0 (\"Binary\", 1 (\"Xml\") or 2 (\"Json\") and inform the connector how to convert the notification before send it to Apache Kafka Connect. Default value is Json.",
          "type": "integer",
          "enum": [
            0,
            1,
            2
          ]
        }
      }
    },
    "MonitoredItemConfiguration": {
      "title": "Monitored Item Configuration",
      "description": "The configuration used to describe each MonitoredItem to be added to the OPC-UA subscription.",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "NodeId": {
          "title": "NodeId",
          "description": "The NodeId representing the node to be added in the OPC-UA subscription (see https://opcfoundation.org/about/opc-technologies/opc-ua/).",
          "type": "string"
        },
        "IsRoot": {
          "title": "IsRoot",
          "description": "If set to true then all NodeIds in the tree below the NodeId are added to the OPC-UA subscription. Default is false which means that only the NodeId will be added to the OPC-UA subscription.",
          "type": "boolean"
        },
        "Parameters": {
          "$ref": "#/definitions/MonitoredItemParameters-1"
        },
        "KafkaConnectParameters": {
          "$ref": "#/definitions/KafkaConnectParameters-1"
        }
      },
      "required": [
        "NodeId"
      ]
    },
    "MonitoredItemParameters": {
      "title": "Default MonitoredItemParameters",
      "description": "The MonitoredItemParameters parameters associated to this specific SubscriptionConfiguration. If not set the value is inherited from the GlobalMonitoredItemParameters",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "QueueSize": {
          "title": "Queue Size",
          "description": "The size (deep) of the changes queue (see https://opcfoundation.org/about/opc-technologies/opc-ua/). Default is 50.",
          "type": "integer"
        },
        "DiscardOldest": {
          "title": "Discard Oldest",
          "description": "If set to true then discard oldest when queue is full (see https://opcfoundation.org/about/opc-technologies/opc-ua/). Default is true.",
          "type": "boolean"
        }
      }
    },
    "MonitoredItemParameters-1": {
      "title": "Parameters",
      "description": "The MonitoredItemParameters parameters associated to this specific MonitoredItemConfiguration. If not set the value is inherited from the SubscriptionConfiguration",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "QueueSize": {
          "title": "Queue Size",
          "description": "The size (deep) of the changes queue (see https://opcfoundation.org/about/opc-technologies/opc-ua/). Default is 50.",
          "type": "integer"
        },
        "DiscardOldest": {
          "title": "Discard Oldest",
          "description": "If set to true then discard oldest when queue is full (see https://opcfoundation.org/about/opc-technologies/opc-ua/). Default is true.",
          "type": "boolean"
        }
      }
    },
    "MonitoredItemParameters-2": {
      "title": "Global MonitoredItemParameters",
      "description": "A global value for MonitoredItemParameters can be set. Default is not set and inherits default values from MonitoredItemParameters.",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "QueueSize": {
          "title": "Queue Size",
          "description": "The size (deep) of the changes queue (see https://opcfoundation.org/about/opc-technologies/opc-ua/). Default is 50.",
          "type": "integer"
        },
        "DiscardOldest": {
          "title": "Discard Oldest",
          "description": "If set to true then discard oldest when queue is full (see https://opcfoundation.org/about/opc-technologies/opc-ua/). Default is true.",
          "type": "boolean"
        }
      }
    },
    "SessionConfiguration": {
      "title": "Session Configuration",
      "description": "It is a mandatory section which describes how to connect to the OPC-UA Server.",
      "type": "object",
      "properties": {
        "ConfigFilename": {
          "title": "OPC-UA Configuration file",
          "description": "The file containing the information used from the OPC-UA Stack for the connection to an OPC-UA server (see https://opcfoundation.org/about/opc-technologies/opc-ua/). If the file location is relative to this file location the connector automatically discover it, otherwise the location shall be an absolute path.",
          "type": [
            "string",
            "null"
          ]
        },
        "EndPoint": {
          "title": "Remote OPC-UA Endpoint",
          "description": "The URL where the remote OPC-UA server is exposing (see https://opcfoundation.org/about/opc-technologies/opc-ua/).",
          "type": "string"
        },
        "AutoAccept": {
          "title": "AutoAccept",
          "description": "If set to true automatically accepts certificates;, otherwise AutoAcceptStatusCodes is checked.",
          "type": "boolean"
        },
        "AutoAcceptStatusCodes": {
          "title": "AutoAccept StatusCode",
          "description": "The list of StatusCode used to valid a certificate if AutoAccept is set to true; The values are BadCertificatePolicyCheckFailed (The certificate does not meet the requirements of the security policy.) = 0x81140000; BadCertificateTimeInvalid (The certificate has expired or is not yet valid.) = 0x80140000; BadCertificateIssuerTimeInvalid (An issuer certificate has expired or is not yet valid.) = 0x80150000; BadCertificateHostNameInvalid (The HostName used to connect to a server does not match a HostName in the certificate.) = 0x80160000; BadCertificateUriInvalid (The URI specified in the ApplicationDescription does not match the URI in the certificate.) = 0x80170000; BadCertificateUseNotAllowed (The certificate may not be used for the requested operation.) = 0x80180000; BadCertificateIssuerUseNotAllowed (The issuer certificate may not be used for the requested operation.) = 0x80190000; BadCertificateUntrusted (The certificate is not trusted.) = 0x801A0000; BadCertificateRevocationUnknown (It was not possible to determine if the certificate has been revoked.) = 0x801B0000; BadCertificateIssuerRevocationUnknown (It was not possible to determine if the issuer certificate has been revoked.) = 0x801C0000; BadCertificateRevoked (The certificate has been revoked.) = 0x801D0000; BadCertificateIssuerRevoked (The issuer certificate has been revoked.) = 0x801E0000; BadCertificateChainIncomplete (The certificate chain is incomplete.) = 0x810D0000. By default all values are added to the list.",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "integer"
          }
        },
        "UseSecurity": {
          "title": "Use Securiry for OPC-UA Endpoint",
          "description": "Set the value to true to enable the usage of encryption is OPC-UA channels.",
          "type": "boolean"
        },
        "UpdateBeforeConnect": {
          "title": "Update configuration before connect to an OPC-UA channel",
          "description": "If set to true the discovery endpoint is used to update the endpoint description before connecting (see https://opcfoundation.org/about/opc-technologies/opc-ua/).",
          "type": "boolean"
        },
        "CheckDomain": {
          "title": "Check Domain on OPC-UA certificate",
          "description": "If set to true then the domain in the certificate must match the endpoint used (see https://opcfoundation.org/about/opc-technologies/opc-ua/).",
          "type": "boolean"
        },
        "SessionName": {
          "title": "Session Name assigned",
          "description": "The name to assign to the session.",
          "type": [
            "string",
            "null"
          ]
        },
        "UserName": {
          "title": "User Name",
          "description": "The username to be used when the connection authentication needs a username/password identity.",
          "type": [
            "string",
            "null"
          ]
        },
        "Certificate": {
          "title": "Certificate",
          "description": "The certificate to be used when the connection authentication needs a certificate identity.",
          "type": [
            "string",
            "null"
          ]
        },
        "Password": {
          "title": "Password",
          "description": "The password to be used when the connection authentication needs a username/password or certificate identity.",
          "type": [
            "string",
            "null"
          ]
        },
        "OperationTimeout": {
          "title": "Operation Timeout",
          "description": "The timeout in milliseconds associated to all requests made to the OPC-UA server (see https://opcfoundation.org/about/opc-technologies/opc-ua/).",
          "type": "integer"
        },
        "KeepAliveInterval": {
          "title": "KeepAlive Interval",
          "description": "The interval, in millisends, between each keepalive request made on the OPC-UA server (see https://opcfoundation.org/about/opc-technologies/opc-ua/).",
          "type": "integer"
        },
        "SessionTimeout": {
          "title": "Session Timeout",
          "description": "The timeout period, in milliseconds, for the session (see https://opcfoundation.org/about/opc-technologies/opc-ua/).",
          "type": "integer"
        },
        "ReverseConnectUrl": {
          "title": "Reverse Connect Url",
          "description": "The Url used from the reverse connection manager, default is null which disable the feature.",
          "type": [
            "string",
            "null"
          ]
        },
        "ReconnectPeriod": {
          "title": "Reconnect Period",
          "description": "The interval, in millisends, the connector tries to reconnect after a disconnection before declares the OPC-UA server no more reachable and informs the Apache KAfka Connect infrastructure.",
          "type": "integer"
        },
        "ReconnectPeriodExponentialBackoff": {
          "title": "Reconnect Period Exponential Backoff",
          "description": "The reconnect period exponential backoff to be used in ms.",
          "type": "integer"
        },
        "PreferredLocales": {
          "title": "Preferred Locales",
          "description": "The preferred locales (see https://opcfoundation.org/about/opc-technologies/opc-ua/).",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "required": [
        "EndPoint"
      ]
    },
    "SubscriptionConfiguration": {
      "title": "OPC-UA Subscription Configuration",
      "description": "The configuration used to describe each Subscription to be added to the OPC-UA session.",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "PublishingInterval": {
          "title": "Publishing Interval",
          "description": "The publishing interval (see https://opcfoundation.org/about/opc-technologies/opc-ua/). Default is 1000.",
          "type": "integer"
        },
        "KeepAliveCount": {
          "title": "Keep Alive Count",
          "description": "The keep alive count (see https://opcfoundation.org/about/opc-technologies/opc-ua/). Default is 10.",
          "type": "integer"
        },
        "LifetimeCount": {
          "title": "Lifetime Count",
          "description": "The life time of the subscription in counts of publish interval. LifetimeCount shall be at least 3*KeepAliveCount (see https://opcfoundation.org/about/opc-technologies/opc-ua/). Default is 30.",
          "type": "integer"
        },
        "MaxNotificationsPerPublish": {
          "title": "Max Notifications Per Publish",
          "description": "The maximum number of notifications per publish request (see https://opcfoundation.org/about/opc-technologies/opc-ua/). Default is 1000.",
          "type": "integer"
        },
        "Priority": {
          "title": "Priority",
          "description": "The priority assigned to the subscription (see https://opcfoundation.org/about/opc-technologies/opc-ua/). Default is 100.",
          "type": "integer"
        },
        "SequentialPublishing": {
          "title": "Sequential Publishing",
          "description": "true if incoming messages are handled sequentially; false otherwise. Setting SequentialPublishing to true means incoming messages are processed in a \"single-threaded\" manner and callbacks will not be invoked in parallel. (see https://opcfoundation.org/about/opc-technologies/opc-ua/). Default is false.",
          "type": "boolean"
        },
        "DefaultMonitoredItemParameters": {
          "$ref": "#/definitions/MonitoredItemParameters"
        },
        "DefaultConnectParameters": {
          "$ref": "#/definitions/KafkaConnectParameters"
        },
        "MonitoredItems": {
          "title": "MonitoredItems",
          "description": "A set of MonitoredItemConfiguration describing the MonitoredItem(s) to be subscribed.",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/definitions/MonitoredItemConfiguration"
          }
        }
      }
    }
  },
  "type": "object",
  "properties": {
    "ApplicationName": {
      "title": "Application Name",
      "description": "The user defined name associated to the application where the connector is in use; can be used to describe the published data and can be added to the record key.",
      "type": "string"
    },
    "ApplicationVersion": {
      "title": "Application Version",
      "description": "The user defined version associated to the application where the connector is in use; can be used to describe the published data and can be added to the record key.",
      "type": "string"
    },
    "SessionConfiguration": {
      "$ref": "#/definitions/SessionConfiguration"
    },
    "Subscriptions": {
      "title": "Subscriptions",
      "description": "A set of SubscriptionConfiguration describing the subscriptions to be created.",
      "type": "array",
      "items": {
        "$ref": "#/definitions/SubscriptionConfiguration"
      }
    },
    "GlobalMonitoredItemParameters": {
      "$ref": "#/definitions/MonitoredItemParameters-2"
    },
    "GlobalKafkaConnectParameters": {
      "$ref": "#/definitions/KafkaConnectParameters-2"
    }
  },
  "required": [
    "ApplicationName",
    "ApplicationVersion",
    "SessionConfiguration",
    "Subscriptions"
  ]
}

The schema contains the description of each field.