Skip to content

Should I Use OPC UA or MQTT or AMQP?

    “Should I use OPC UA or MQTT or AMQP?” “What is the difference between Pub/Sub and Client/Server architectures?” These are some frequently asked questions in need of addressing.

    When aiming at high performance with minimal bandwidth, Publish/Subscribe is more efficient than hand shaking based protocols like Client/Server. OPC UA Part 14 defines a Pub/Sub architecture for both LAN and WAN based communications. The difference between the two is what type of transport is used since there are different challenges to overcome in different environments:

    • For lateral connectivity (subnets, LANs): UDP
    • For vertical connectivity (cloud environments, WANs): MQTT or AMQP

    In other words: It is not a question of OPC UA vs. MQTT vs. AMQP… it is a question of OPC UA over what transport is best. MQTT and AMQP are options.

    OPC UA Pub/Sub is planned to be released at the end of 2017 with UDP transport specified in its initial version. Transport via AMQP and MQTT is on the roadmap for 2018. The OPC UA Pub/Sub working group currently has 85+ members working diligently to develop these technologies.

    From a data speed perspective, there are different reasons for using one data connectivity method over another. Client/Server is great for working with low-frequency data (10 ms and above, e.g. supervisory control). Pub/Sub is great for working with high-frequency data (1-10 ms range, e.g. streaming real-time data).

    The key here is with the OPC UA PubSub specification (Part 14) you can choose whichever method works best for you without giving up the power of what OPC UA delivers:

    1. Proven Security

    Using OPC UA over MQTT gives you END-TO-END encryption. This means encryption is established between the OPC UA publisher and OPC UA subscriber so data remains encrypted regardless of how many hops there are between the publisher and subscriber. This is in contrast to MQTT-only security which relies on each broker along the route not being compromised.

    2. Data Context

    People often get side-tracked in data connectivity standards discussions by the idea that ‘context’ (metadata) can simply be preserved by sending the complex data encoded in JSON or XML.

    While you can encode data using whatever custom scheme you want (e.g. defined contract between edge based publisher and cloud based ingester subscribing to it) this does not solve the massive problem of getting all vendors, from all industrial and commercial sectors to agree to use the same schema. This ultimately leads to data lakes full of data based on countless schema encodings each of which the ‘big data’ applications need to be aware of to make any sense of the data.

    What OPC UA provides is a de-facto method of expressing simple or incredibly complex data relationships in a standardized format which, can be understood by all OPC UA compliant components. For applications where PubSub transport is better suited, OPC UA uses the PubSub transport but still retains the original data relationships because it uses OPC UA object encoding.

    3. Industrie 4.0 / IIoT Readiness

    Using standards-based data connectivity is essential to ensure we are building a truly ubiquitous connected world. With regards to Industrie 4.0 in Germany, after extensive independent testing, the BSI identified OPC UA as the data connectivity standard for making Industrie 4.0 a reality. This is one reason why all major vendors are pushing forward with OPC UA implementation in their products.

    Taken as a whole, the conversation about ‘data connectivity’ also needs to extend to how that data is used. OPC UA also allows for its components to securely send commands to each other allowing them to directly act/react to data rather than just passively send it back and forth and rely on other applications to make it actionable.

    Darek Kominek, Sr. Global Consulting Manager

    Not quite on the OPC UA bandwagon yet?

    Get your legacy OPC Classic Infrastructure right to the Cloud!

    [NEW WHITEPAPER] “MIGRATION FROM OPC CLASSIC TO OPC UA”: In this whitepaper Matrikon is sharing a brief overview of the key features of OPC UA and a comparison with the legacy OPC Classic standard, and outlines the motivation for upgrading to OPC UA based on a managed, secure and seamless migration path.

    Read the Full White Paper