C++ Based OPC UA Client/Server/PubSub SDK  1.7.2.493
PubSub SDK Introduction

This part of the documentation contains general information about the PubSub functionality in the SDK.

Introduction

The OPC UA Client/Server communication model defines already a subscription (see OPC UA Subscription Concept) that allows OPC UA Clients to subscribe for changes of Variable Values or for Event notifications. The Client/Server subscription is specific to the client who created the subscription and ensures reliable one time delivery of data changes and events.

The OPC UA PubSub communication model provides an optimized Publish Subscribe model for use cases where the Client/Server Subscription does not fit. One use case is high speed and cyclic data communication, where reliability is not required. Another use case is offloading of data distribution to a large (unlimited) number of receivers.

In this model, the Publisher produces messages that are sent to a so called Message Oriented Middleware. This Message Oriented Middleware can be network infrastructure if UDP multi-cast is used as transport protocol or could be a message broker if MQTT is used as transport protocol. The Publisher sends the messages independent of the number of Subscribers. Therefore the role of a Subscriber receiving messages is independent of the application that configures what the Publisher is sending.

The content of the exchanged messages is called DataSet. The DataSetMetaData describes the layout of the messages and can provide additional meta-data like units for the fields in the DataSet.

The selection of the input for the DataSet messages is called PublishedDataSet. The selection can be a list of Variable Values or the fields on an EventType.

The following figure shows the configuration model for OPC UA PubSub.

pubsubconfigmodel.png

A PubSub connection defines the used protocol and the network address for sending or receiving messages. In the case of a message broker, the address represents a TCP/IP connection to the broker endpoint. In the case of UDP, this could be an IP multi-cast group. The selected protocol defines also the protocol specific headers used for the sent messages.

A WriterGroup defines the timing and header settings for PubSub NetworkMessages sent by a Publisher. Such a NetworkMessage can contain one or more DataSetMessages for the DataSetWriters contained in the WriterGroup.

The DataSetWriter is linked to a PublishedDataSet that defines the source of the message content and the DataSetMetaData. In addition the DataSetWriter defines the header settings for the DataSetMessage.

The DataSetReader is the counterpart to a DataSetWriter on the Subscriber side. It defines the filter for the selection of the Publisher and DataSetWriter of interest. It also contains the SubscribedDataSet that defines the processing of the received data. The default processing is a mapping to target variables in the Subscriber address space.

OPC UA PubSub defines different transport protocol mappings like UDP and MQTT and different message mappings like UADP (UA Datagram Protocol) and JSON.

The different configuration objects have generic settings and typically also transport and message mapping specific settings.

The following pages provide further information on the PubSub functionality in the SDK: