Configuration

Configuration can be done via JSON file, the default file name is proxy_config.json. All the config keys that are not recognized will be ignored, if no configuration is provided for a parameter its default value will be loaded. An example of configuration file can be the following:

{
    "opcServerURL":"opc.tcp://localhost:4840/freeopcua/server/",

    "loggerConfig" :{
        "loglevel" :"info"
    },

    "nodesLoader" : {
        "targetIdentifier" : "browseName",
        "whiteList":["MyVariable"]
    },
    "gRPC" :{
            "port" : 5051
    }
}

gRPC-Connector Configs

These configs are related to the gRPC Connector, they must be placed under the key gRPC as follows:

{
    // Other config here

    "gRPC" :{
            "port" : 5051
    }
}

Config Key

type

Default

Notes

host

string

localhost

host name on the network.

port

int

5051

Port on which to listen for client requests

Kafka-Connector Configs

These configs are related to the Kafka-Connector, they must be placed under the keys kafkaProducer and kafkaRPC, there are also two root level configs: KafkaSchemaRegistryURL and KafkaServers, as in the example:

{
    // Other config here

    opcSystemName : "OPC",
    KafkaSchemaRegistryURL : "localhost:8081",
    KafkaServers : "localhost:9092",

    kafkaProducer : {
        // Producer conf
    },
    kafkaRPC : {
        // RPC conf
    }
}

Root level cofigs:

Config Key

type

Default

Notes

opcSystemName

string

OPC

System name is a core variable, it will be used to evaluate the topic names for nodes publishing, see Kafka-Connector

KafkaSchemaRegistryURL

string

localhost:8081

Endpoint of the schema registry

KafkaServers

string

localhost:9092

Comma separated list of kafka brokers. These will be set for the producer and the consumer of the OPC-Proxy, this can be overidden, see below.

kafkaProducer:

Config Key

type

Default

Notes

BootstrapServers

string

localhost:9092

Comma separated list of Kafka brokers endpoints. If not set, this will be set to the value of KafkaServers.

BatchNumMessages

int

10000

See Confluent producer docs

LingerMs

int

100 [ms]

See Confluent producer docs

QueueBufferingMaxKbytes

int

1048576 [Kbytes]

See Confluent producer docs

QueueBufferingMaxMessages

int

100000

See Confluent producer docs

MessageTimeoutMs

int

300000

See Confluent producer docs

EnableIdempotence

bool

false

See Confluent producer docs

RetryBackoffMs

int

100 [ms]

See Confluent producer docs

MessageSendMaxRetries

int

2

See Confluent producer docs

kafkaRPC:

All the non reported kafka consumer configurations are set to default values.

Config Key

type

Default

Notes

BootstrapServers

string

localhost:9092

Comma separated list of Kafka brokers endpoints. If not set, this will be set to the value of KafkaServers.

GroupId

string

OPC

Group ID of the RPC kafka consumer. No other consumer can have this group ID in the whole system. If not set, default is to be set to opcSystemName.

enableKafkaRPC

bool

true

Enable the RPC-style comunication trough kafka topics.

EnableAutoCommit

bool

true

See Confluent consumer docs

EnableAutoOffsetStore

bool

true

See Confluent consumer docs

AutoCommitIntervalMs

int

5000 [ms]

See Confluent consumer docs

SessionTimeoutMs

int

10000 [ms]

See Confluent consumer docs

AutoOffsetReset

string

latest

See Confluent consumer docs

EnablePartitionEof

bool

false

See Confluent consumer docs

FetchWaitMaxMs

int

1000 [ms]

See Confluent consumer docs

FetchMinBytes

int

1

See Confluent consumer docs

HeartbeatIntervalMs

int

3000 [ms]

See Confluent consumer docs

InfluxDB-Connector Configs