WriterGroups and DataSetWriters
A discussion on this article asked for a simple diagram showing the structure of a PubSubConnection object. A complete discussion of the PubSubConnection object is here. Note that the PubSubConnection supports features that are not needed when using MQTT with JSON.
When using MQTT, the WriterGroup defines how a MQTT message is constructed. It allows updates for multiple DataSets to be bundled in a single MQTT message. When using the OPC UA Binary encoding, the WriterGroup is also used to apply security to individual MQTT messages. WriterGroups for Tier 1 and Tier 2 applications limit each MQTT message to one DataSet update.
The DataSetWriter defines how to package updates for a single DataSet. State information, such as SequenceNumbers or KeyFrame frequency are associated with the DataSetWriter. Tier 1 applications omit the headers that report the DataSetWriter state.
The DataSetMetaData defines what is in a DataSet. It includes the names of the fields and all the information needed to understand and interpret the field values.