UaPublisher Data Flow
Below is a picure visualize the internal data flow in the ApisUaPublisherBee.
The OpcUa bee creates new DataSet every time new values from the OpcUa-server arrive. The DataSet is transfered to UaPublisher and added to the DataQue. Each writer in UaPublisher has it own que. The QueSize is defined by the property MaxDataSetMessageBufferSize (id: 121100) and should be 2-3 times the expected size in a PublishInterval (id:11020). By setting the DiagnosticLevel for the Variabel DataSetWrter to debug you get a status DataSetQueSize showing the current number of DataSet in the DataQue.
On PublishInterval (id:11020) the WriterGroup empty all DataQue convert the DataSet according to specification and store the messages in the MessageQue. The maximum size of MessageQue is defined by the paramete NetworkMessageQueSize (id:11025). It is one que for each WriterGroup. If the MessageQue is dfull, then the message is written to the Database (DB).
There is one thread for each MessageQue that sends the messages to the specified destination. If a sending fails, the message will be resent once, and if that one also fail, the message is stored in the DB. When e.g. the network to an Eventhub is down all messages will end up in the DB.
Messages in DB are sent to the Backfill eventhub. Messages are deleted from DB when messages are successfully written to Eventhub.
If the OpcUaBee that represent the DataSet are configured with catchup, all DataSet are converted to JsonMessages and stored directly in DB. If there are added sizelimits to the DB, the UaPublisher will wait until DB er ready for more. In this case no DataSet will be lost.