FlowSync
FlowSync implements synchronous request handling for HTTP server nodes and OPC UA server nodes within Connectware. When activated, Connectware suspends response generation until a corresponding MQTT message is received, enabling synchronized processing across different protocols and systems. This enables a closed communication loop between machines and IT systems, confirming every step of the data journey – even when errors occur.
You can customize the behavior of FlowSync through configuration:
- Define custom timeout durations for request-response cycles 
- Configure default timeout messages returned to clients 
- Specify custom error messages for different error scenarios 
FlowSync is part of the Cybus:Node resource.
Processing Flow
The following outlines the data flow from initial request to completion.
Initial Request Reception
When a request (HTTP or OPC UA) arrives at the server endpoint:
- The request remains open rather than returning an immediate response 
- The system publishes an MQTT message on the - /treqtopic. The published data has the following structure:
{
  "id": "cb75f252-ebd8-4b33-b39d-b74953c6c99c",
  "timestamp": 1733219059372,
  "value": { ... }
}- A unique identifier is generated and embedded in the message payload 
Transaction Completion
Upon receiving the MQTT response message, the system:
- Correlates it with the original request using the unique identifier 
- Processes the response data on the - /trestopic. The received data has the following structure:
{
  "id": "cb75f252-ebd8-4b33-b39d-b74953c6c99c",
  "timestamp": 1733219059372,
  "value": { ... }
}- Completes the original protocol-specific request 
The transaction remains active until either:
- A valid MQTT response is received 
- The configured timeout period expires 
Enabling FlowSync
FlowSync functionality is controlled through the node resource configuration in your service commissioning files.
- To implement synchronous processing, set the - operationproperty of a Cybus:Node resource to- transaction:
node:
    operation: transactionFlowSync Example Files
The following sections provide practical examples of service commissioning files that demonstrate how to implement FlowSync with both HTTP and OPC UA connections. Each example includes a complete configuration along with explanations of key aspects to help you understand and adapt FlowSync for your specific needs.
Last updated
Was this helpful?

