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 |
|
LingerMs |
int |
100 [ms] |
|
QueueBufferingMaxKbytes |
int |
1048576 [Kbytes] |
|
QueueBufferingMaxMessages |
int |
100000 |
|
MessageTimeoutMs |
int |
300000 |
|
EnableIdempotence |
bool |
false |
|
RetryBackoffMs |
int |
100 [ms] |
|
MessageSendMaxRetries |
int |
2 |
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 |
enableKafkaRPC |
bool |
true |
Enable the RPC-style comunication trough kafka topics. |
EnableAutoCommit |
bool |
true |
|
EnableAutoOffsetStore |
bool |
true |
|
AutoCommitIntervalMs |
int |
5000 [ms] |
|
SessionTimeoutMs |
int |
10000 [ms] |
|
AutoOffsetReset |
string |
latest |
|
EnablePartitionEof |
bool |
false |
|
FetchWaitMaxMs |
int |
1000 [ms] |
|
FetchMinBytes |
int |
1 |
|
HeartbeatIntervalMs |
int |
3000 [ms] |