Kafka Config Reference

Below is a comprehensive list of each configuration option on the Kafka driver with its default, a description of its purpose and what effect it will have.

The driver options are set on the Drivers screen. The options a tag uses to consume from Kafka are set per tag on the Tags screen, and are listed under Consumer tag properties.

Minimum configuration requirements

These are the fields that need a value before the driver will do anything. Everything else has a working default.

FieldNeeded forNotes
Driver Interface NameBothThe name tags refer to in Select Driver Interface.
DriverBothSet to Kafka.
Bootstrap ServersBothDefaults to localhost:9092, which is a real address - the driver will try it.
EnableBothThe interface is not active until this is on and the changes are applied.
Publish Selected TagsProducerOff by default. A driver interface with this off is a consumer only.
Tags To PublishProducerNothing is published until tags are added.
TopicConsumerSet on the tag, not on the driver.

Driver interface

PropertyDefaultNotes
Driver Interface Name-The name used to identify this driver interface. Tags reference it from their Select Driver Interface property.
DriverModbusSet to Kafka to produce and consume with Apache Kafka clusters.
EnableonEnable communications. Hidden when Enable by Tag is on.
Enable by TagoffEnable and disable the driver from a Boolean tag instead, named in the field beside it.
Good Quality When DisabledoffOn: tags on this driver keep good quality while the driver is disabled, and can be written to. Off: they go to bad quality.
SimulateoffDisable communications and hold every value static with good quality.
Return to Online60 SecondsHow often to re-check communications after the interface has been taken offline.

Connection

PropertyDefaultNotes
Bootstrap Serverslocalhost:9092Comma-delimited list of broker addresses as host:port. This is a seed list only - the addresses are used to fetch cluster metadata and the full broker set is then learned from the cluster, so listing more than one buys startup and reconnect resilience rather than load balancing. Every entry must be a broker of the same cluster; a disaster-recovery cluster belongs in Failover Bootstrap Servers, not here.
Security ProtocolPlaintextPlaintext, Ssl, SaslPlaintext or SaslSsl. Plaintext suits a cluster on the local network; a hosted cluster will want SSL or SASL.
SASL MechanismPlainGssapi, Plain, ScramSha256, ScramSha512 or OAuthBearer. Shown for the SASL protocols.
SASL UsernameblankShown for Plain, ScramSha256 and ScramSha512. For Confluent Cloud this is the API key.
SASL PasswordblankAs above. For Confluent Cloud this is the secret.

TLS certificates

Shown when the Security Protocol is Ssl or SaslSsl. Each certificate can be given as a file path or pasted as PEM text - use one or the other, not both.

PropertyDefaultNotes
SSL CA LocationblankPath to the CA certificate file.
SSL CA PemblankThe CA certificate as PEM text.
SSL Certificate LocationblankPath to the client certificate file.
SSL Certificate PemblankThe client certificate as PEM text.
SSL Key LocationblankPath to the client private key file.
SSL Key PemblankThe client private key as PEM text.
SSL Key PasswordblankPassphrase for an encrypted private key.
SSL Keystore LocationblankPath to a PKCS#12 keystore, as an alternative to the separate certificate and key.
SSL Keystore PasswordblankPassword for the keystore.

Producer tuning

These tune throughput against latency on the producer side. Each has a working default, and the defaults suit most clusters.

PropertyDefaultNotes
AcksLeaderNone, Leader or All. How many brokers must acknowledge a write before it counts as delivered. All is the durable choice; None is the fastest and can lose messages.
Client Idoas-kafkaThe identifier the driver sends with its requests, and what the broker logs it as.
Compression TypeNoneNone, Gzip, Snappy, Lz4 or Zstd.
Batch Num Messages10000Maximum number of messages in one producer batch.
Batch Size1000000Maximum size in bytes of one producer batch.
Linger5 msHow long to wait for more messages before sending a batch. Higher gives larger, better-compressed batches at the cost of latency.
Max In Flight1000000Requests allowed in flight per broker connection before the producer blocks.
Message Max Bytes1000000Maximum size of a single message. Must not exceed the broker's own limit.
Message Timeout300000 msHow long the producer keeps trying to deliver a message before it fails.
Queue Buffering Max Kbytes1048576Maximum total size of the producer's send queue.
Queue Buffering Max Messages100000Maximum number of messages in the producer's send queue.
Request Timeout30000 msHow long to wait for a broker to answer a produce request.
Socket Connection Timeout30000 msHow long to wait for a broker socket to be set up.
Socket Keepalive EnableoffEnable TCP keep-alives on broker sockets.
Socket Timeout60000 msHow long a broker socket may stall before it is treated as failed.
Transaction Timeout60000 msHow long a transaction may remain open.

Topic creation

PropertyDefaultNotes
Automatically Create TopicsonBefore a topic is written to for the first time, create it if it does not exist already.
Replication Factor-1Used when a topic is created. -1 leaves it to the broker's default. Shown when Automatically Create Topics is on.
Number Partitions-1Used when a topic is created. -1 leaves it to the broker's default. Shown when Automatically Create Topics is on.

Message format New

PropertyDefaultNotes
Output FormatDefaultDefault - JSON, with field names taken from the payload field names. ISA-95 Lite - the built-in unified namespace schema. Custom AVRO Schema - your own schema.
Batched MessagesonDefault format only. On: every tag value goes into one message. Off: each tag value is published as its own message, still using the same structure.
AVRO SchemablankThe AVRO schema the message is published against, written or loaded in the Edit AVRO schema dialog - see Schema mapping. Shown when the Output Format is Custom AVRO Schema.
AVRO Schema Field MapblankWhich part of a tag fills each field in the schema. Built on the Field Mapping tab of the same dialog - see Schema mapping. Shown when the Output Format is Custom AVRO Schema.
Force AVRO Binary NewoffPublish AVRO binary using the Avro single-object encoding, which carries a fingerprint of the schema in place of a Schema Registry ID. The consumer needs a copy of the same schema, so download the .avsc from the Output Format field and give it to the consumer - that is what keeps the two ends in step. When this is off, messages are published as JSON. There is no JSON fallback while this is on: a value that cannot be encoded is discarded and logged. Shown when the Schema Registry is off - with the registry on the wire format is already AVRO binary and the schema ID comes from the registry.

ISA-95 Lite

ISA-95 Lite publishes a fixed record aligned with the ISA-95 Part 2 equipment hierarchy model, for a unified namespace. It is not an official ISA or MESA publication.

FieldFilled from
equipmentHierarchy.enterprise .site .siteId .areaThe ISA-95 level assigned to the tag groups that enclose the tag
equipmentHierarchy.workCenter .workCenterTypeWork Center tier - Process Cell, Production Unit, Production Line or Storage Zone
equipmentHierarchy.workUnit .workUnitType .workUnitIdWork Unit tier - Unit, Work Cell or Storage Unit
equipmentHierarchy.equipmentModule .equipmentModuleId .controlModule .controlModuleIdThe lower two tiers
groupPathThe tag's group path verbatim, as an array, at any depth
tagNameThe full tag path
timestampThe tag's own timestamp, as epoch milliseconds
dataTypeBOOLEAN, INT, LONG, FLOAT, DOUBLE or STRING
valueThe tag value
quality.isGood quality.severityOAS quality, normalised to GOOD or BAD
units sourceProtocolThe tag's Units and Data Source
metadataAdditional key/value pairs

Info

The hierarchy fields are resolved by walking the tag groups that enclose the tag and reading the ISA-95 level assigned to each group. A group with no level assigned contributes nothing, and a tag at the root of the configuration publishes null for the hierarchy fields. Where a group has an export name override, the override is published instead of the group's own name.

Schema mapping New

A custom AVRO schema has to be told which part of a tag fills each of its fields. Both the schema and that mapping are built in the Edit AVRO schema dialog, which has three tabs: Schema Editor, Field Mapping and Data Test. Nothing is written back to the driver until you click OK.

Schema Editor

Where the schema itself is written. Load from file… brings in an existing .avsc, or you can paste it in and click Format to tidy it; Copy takes it back out. JSON and Tree switch between the raw schema and a structural view of it. Alongside them the header shows the schema's size and whether it is valid AVRO - the Field Mapping tab is built from the fields it finds, so this is where a malformed schema shows up first.

Edit AVRO schema - the Schema Editor tab

Field Mapping

Every field in the schema, in schema order, with nested records indented under their parent and the field count shown on the tab. The schema's own doc text is shown beside each field, which makes a well-documented schema much easier to map.

Edit AVRO schema - the Field Mapping tab

ColumnWhat it holds
Schema fieldThe field name, taken from the schema
TypeThe AVRO type, taken from the schema - a nested record is marked record and holds no value of its own
SourceWhat fills the field
Detail / formatQualifies the source - which ISA-95 level, which tag property, how to render it

Sources:

SourceFills the field with
Tag PropertyValue, Timestamp, Tag Name, Tag Path, Group Path, Quality, Quality Severity, Tag ID, Data Type, or any named custom tag property
HierarchyAn ISA-95 level, resolved from the groups enclosing the tag
ConstantA fixed value
System TimestampThe engine clock at message build. Publishing both this and the tag timestamp makes latency measurable, as the difference between the two.
UUIDA fresh identifier per record, so two records for the same tag in the same millisecond stay distinguishable
Null / IgnoreThe field is left null

The ISA-95 levels available under Detail / format are Enterprise, Site, Site ID, Area, Work Center, Work Center Type, Work Unit, Work Unit Type, Work Unit ID, Equipment Module, Equipment Module ID, Control Module and Control Module ID, along with the tag's group path. A level with no matching group resolves to null, and a field left unmapped is published as null rather than omitted.

For a value or a timestamp, Detail / format is how it is rendered instead. Timestamp fields take ISO 8601, Unix seconds, Unix milliseconds, ticks, or a custom .NET format string. Value fields take as-is, force to string, parse as numeric, round to integer, true/false, 0/1, or a custom pair of boolean words.

Info

Tag Name returns the last two components of the tag path. On a two-level tag it is identical to Tag Path. Where a field has to identify the tag uniquely, map Tag Path.

Data Test

Pick a tag from the browser on the left and the tab renders the message that tag would produce right now, beside its current value, quality and timestamp, with Refresh to take a fresh reading. It is a preview built from live tag data - nothing is published to the cluster by it.

Edit AVRO schema - the Data Test tab

This is the quickest way to catch a mapping that is syntactically fine but wrong: a hierarchy level that resolves to null because the tag is not under a group carrying that level, a timestamp in the wrong units, or a boolean that reaches the consumer as a string.

Schema Registry New

PropertyDefaultNotes
Enable Schema RegistryoffConnect to a Confluent Schema Registry for AVRO schema management.
Schema Registry URLblankFor example http://localhost:8081.
Schema Registry UsernameblankIf the registry requires authentication.
Schema Registry API KeyblankEntered as a password.
Schema Subject NameblankThe subject to register or retrieve schemas under. Leave blank to register under <topic name>-value.

Warning

With the Schema Registry enabled and the Default output format, the message uses the schema's fixed field names - values, id, value, quality, timestamp - and always includes quality and timestamp. The payload field names below do not apply, and neither do multiple pipe-separated tag identifiers.

Publishing

Publishing is off until Publish Selected Tags is turned on. A driver interface with it off is a consumer only.

PropertyDefaultNotes
Publish Selected TagsoffTurns publishing on for this driver interface.
Tags To Publish-The tags to publish, each with the Id that names it in the message. The Id is also the topic when Publish All Tags As One Topic is off. Use a vertical bar to separate multiple identifiers, for example id1|id2|id3.
Publish TypeContinuousContinuous on an interval, Event Driven from a trigger tag, or Specific Time of Day.
Publish Interval10 SecondsContinuous only.
Publish On StartuponContinuous only. Publish immediately on startup rather than waiting out the first interval.
Trigger Tag-Event Driven only. A Boolean tag triggers on transition; an Integer tag triggers whenever its value changes to a non-zero value.
Digital Trigger TypeFalse to TrueEvent Driven only. False to True, True to False or Both.
Time of Day-Specific Time of Day only.
Publish Latest Value OnlyonOn: publish only the current value of each tag. Off: publish every value change since the last publish. Turn this off when the target is a historian.
Publish Boolean As NumberoffPublish 1 and 0 rather than true and false.
Include All Tags Each PublishoffInclude every selected tag in each publish, even the ones that have not changed.
Include Tags For PeriodoffInclude all tag values in each publish for the period set beside it, then drop the unchanged ones from further publishing. The period defaults to 1 second.
Publish All Tags As One TopiconOn: all values go to Publish Topic Id. Off: each tag goes to its own topic, named by its Id in Tags To Publish.
Publish Topic Idoas_tagsThe topic used when Publish All Tags As One Topic is on.
Override Value When BadNoneWhat to publish when a tag's quality is bad: None (publish it bad), Do Not Send, Hold Last Value, Set To Value or Hold Then Set.
Override Time60 SecondsHow long to hold the last good value. Shown for Hold Last Value and Hold Then Set.
Value When Bad0The value to publish instead. Shown for Set To Value and Hold Then Set.

Payload field names

These name the fields inside a Default format message. They do not apply to ISA-95 Lite or Custom AVRO Schema, where the schema names the fields, and they do not apply when the Schema Registry is enabled.

PropertyDefaultNotes
Values IdvaluesThe name of the array that holds the values.
Publish Tag IdidThe field carrying each tag's identifier.
Publish Value IdvalueThe field carrying the value.
Include QualityonInclude the quality with each value.
Id (quality)qualityThe field carrying the quality.
Include TimestamponInclude the timestamp with each value.
Id (timestamp)timestampThe field carrying the timestamp.
Timestamp TypeISO 8601ISO 8601, Unix, Unix ms, Ticks or Custom.
Formatyyyy-MM-dd HH:mm:ss.ffffffShown when the Timestamp Type is Custom.

Store and Forward

PropertyDefaultNotes
Enable Store and ForwardoffBuffer values when the cluster cannot be reached, rather than discarding them, and forward them once communication is restored.
Last In First OutoffProcess buffered data newest first. Shown when Store and Forward is on, and requires Store Buffer to Disk.

Info

Where the buffer is kept is not a driver property. It is set once for the whole engine under Configure → Options → Store and Forward: Store Buffer to Disk, Directory for Buffer, Limit Disk Buffering and, for buffering data published from a remote engine, Buffer Data for Remote IoT Publish.

Failover

Shown when Enable Failover is on. These describe a second, independent cluster - not more brokers of the primary cluster, which belong in Bootstrap Servers.

PropertyDefaultNotes
Enable FailoveroffEnable fail over to the backup connection when the primary interface fails.
Failover Bootstrap Serverslocalhost:9092Comma-delimited broker addresses of the failover cluster.
Failover Security ProtocolPlaintextAs the primary, for the failover connection.
Failover SASL MechanismPlainShown for the SASL protocols.
Failover SASL UsernameblankShown for Plain, ScramSha256 and ScramSha512.
Failover SASL PasswordblankAs above.
Failover SSL CA LocationblankShown for Ssl and SaslSsl.
Failover SSL CA PemblankAs above.
Failover SSL Certificate LocationblankAs above.
Failover SSL Certificate PemblankAs above.
Failover SSL Key LocationblankAs above.
Failover SSL Key PemblankAs above.
Failover SSL Key PasswordblankAs above.
Failover SSL Keystore LocationblankAs above.
Failover SSL Keystore PasswordblankAs above.
Failover Schema Registry URLblankShown when the Schema Registry is enabled.
Failover Schema Registry UsernameblankAs above.
Failover Schema Registry API KeyblankAs above.

Warning

The failover cluster needs its own Schema Registry. Schema IDs are issued by, and only mean anything within, the cluster that issued them, so the failover brokers cannot borrow the primary cluster's registry.

Consumer tag properties

A tag consumes from Kafka through its own properties on the Tags screen, not through the driver.

PropertyDefaultNotes
Data Type-String or JSON. A JSON tag parses the payload into its members; a String tag holds it as text.
Data Source-Set to Kafka.
Select Driver Interface-The Kafka driver interface the tag subscribes through.
TopicblankThe Kafka topic that supplies this parameter's value.
Read OnlyoffThe value cannot be written to.
Write OnlyoffThe value is not read from the topic, but writes are allowed.

Where next