Copyright © by HiveMQ. All Rights Reserved.
MQTT AS A KEY
TECHNOLOGY
FOR INDUSTRY
4.0 & IIoT
Copyright © by HiveMQ. All Rights Reserved.
WELCOME
• HiveMQ CTO
• Strong background in distributed and large scale
systems architecture
• OASIS MQTT TC Member
• Author of „The Technical Foundations of IoT“
• Conference Speaker and Author
• Program committee member for German and
international IoT conferences
Dominik
Obermaier
@dobermai
linkedin.com/in/dobermai/
Copyright © by HiveMQ. All Rights Reserved.
We Will Talk Today About...
• Why major automotive OEMs chose MQTT for in-factory Industry
4.0 and IIoT use cases (including case studies!)
• Why MQTT is a key technology for IIoT and Industry 4.0
• Why not every cloud vendor delivers what they promise when it
comes to MQTT (including the most common pitfalls)
• How MQTT works and all relevant features
• How to achieve interoperability with MQTT
Copyright © by HiveMQ. All Rights Reserved.
MQTT INTRODUCTION
Copyright © by HiveMQ. All Rights Reserved.
What is MQTT?
• Binary
• Easy
• Publish/Subscribe
• Minimal Overhead
• (I)IoT Messaging Protocol
• Data Agnostic
• Designed for reliable communication
over unreliable channels
Copyright © by HiveMQ. All Rights Reserved.
MQTT Overview
• Binary with minimal overhead
• Persistent (offline) sessions
• Retained Messages
• 3 QoS Levels
• (I)IoT Messaging Protocol
Copyright © by HiveMQ. All Rights Reserved.
MQTT Use
Cases
• Connected Car
• Industry 4.0 / IIoT
• Logistics / Transportation
• (IoT) Messaging
Middleware
• Telecommunications
Copyright © by HiveMQ. All Rights Reserved.
MQTT Use
Cases
• Push Communication
• Reliable Communication
over unreliable networks
• Constrained Devices
• Low Bandwidth and
High Latency
• Industrial Message Bus
Copyright © by HiveMQ. All Rights Reserved.
Publish / Subscribe
Copyright © by HiveMQ. All Rights Reserved.
Protocol Details
• Heartbeat mechanism
• Persistent TCP connections
• Also works over websockets
• IPv4 and IPv6 supported
• MQTT requires TCP/IP
• Clean & Persistent Sessions
• QoS levels for message delivery guarantees
• TLS in the mix for professional deployments
MQTT
TCP
IP
5-7
ISO/OSI
Layer
4
ISO/OSI
Layer
3
ISO/OSI
Layer
Copyright © by HiveMQ. All Rights Reserved.
MQTT Pub/Sub Advantages
• Push Communication
• Message filtering based on subjects topics
• Synchronization Decoupling
• Time Decoupling
• Space Decoupling
• Dynamic Topics
Copyright © by HiveMQ. All Rights Reserved.
MQTT HISTORY
Copyright © by HiveMQ. All Rights Reserved.
2018
MQTT 5 officially
released
2013
HiveMQ 1.3 released
2013
OASIS TC formed
2014
MQTT 3.1.1
officially released
2018
HiveMQ 4 has
MQTT 5 support2019
HiveMQ MQTT
Client 1.0 released
2012
Mosquitto 1.0
released
2010
MQTT 3.1 opened as royalty
free protocol
1999
MQTT invented
for oil pipeline
monitoring
Copyright © by HiveMQ. All Rights Reserved.
The MQTT TC
Copyright © by HiveMQ. All Rights Reserved.
We will talk today about...MQTT Popularity over Time
Copyright © by HiveMQ. All Rights Reserved.
Where does MQTT fit in?
Copyright © by HiveMQ. All Rights Reserved.
Cloud Communication
Copyright © by HiveMQ. All Rights Reserved.
Cloud Communication
Copyright © by HiveMQ. All Rights Reserved.
Factory IIoT Bus
Copyright © by HiveMQ. All Rights Reserved.
Consuming Applications:
Data Warehouse,
Analytics Tools,
Reporting, Monitoring
Application Area
Cloud Connector
Smart Sensors
Power, Consumption,
Vibrations, Temperature,
Humidity…
IIoT Area
Automation Area
Automation Sensors
PLS/STS
IIoT MQTT Broker
Copyright © by HiveMQ. All Rights Reserved.
MULTI CLOUD ISO CONNECTIVITY
Copyright © by HiveMQ. All Rights Reserved.
• MQTT is an ISO Standard (ISO/IEC 20922:2016)
• The ISO standard is clear about the features required for
interoperable communication
• Best practice is to have a central connectivity layer
• Standard conform vendors are replaceable by the the
customer, so the vendor risk is reduced significantly for
customers
• While usually not a concern in the PoC phase, Multi-Cloud
capabilities for the MQTT broker are extremely important
Multi Cloud & ISO
Copyright © by HiveMQ. All Rights Reserved.
Cloud Vendors &
Third Party Services
Connectivity Layer
running on any or
multiple clouds
Devices, Factories
and "Things"
Multi-Cloud
High available
MQTT broker
(multi-cloud possible)
Other 3rd party
services
Copyright © by HiveMQ. All Rights Reserved.
Cloud Vendors &
Third Party Services
Connectivity Layer
running on any or
multiple clouds
Devices, Factories
and "Things"
Multi-Cloud Other 3rd party
services
Device Management
AWS IoT
Big Data
Kinesis
IoT Hub Data Lakes
Machine Learning
Event Hubs
Copyright © by HiveMQ. All Rights Reserved.
HiveMQ
Copyright © by HiveMQ. All Rights Reserved.
HiveMQ
Copyright © by HiveMQ. All Rights Reserved.
Risks when Using Cloud Platforms for
MQTT Connectivity
• SLAs of cloud vendor services usually not acceptable for mission-
critical cloud data pipelines
‣ Azure offers 99,9% uptime for IoTHub [1]
‣ AWS offers 99,9% uptime for IoT Core [2]
‣ 99,9% uptime guarantees is approximately 9 hours downtime per year
• Cloud Vendors don't offer stable API guarantees
‣ Can change or terminate any service at any time
‣ they notice 12 months in advance, though
‣ Many customers require 15+ years guarantees because field device
updates are sometimes hard or impossible
• No price stability guarantees from cloud vendors [3]
[1] https://azure.microsoft.com/en-gb/support/legal/sla/iot-hub/v1_2/
[2] https://aws.amazon.com/iot-core/sla/
[3] https://aws.amazon.com/agreement/
Vendor lock-in to specific clouds (AWS, Azure, GCP)
too risky for industry leaders
Copyright © by HiveMQ. All Rights Reserved.
• Only subsets of the protocol are supported and MQTT can only
be used in a very opinionated way
• Azure does not support the MQTT 5 specification and doesn't
support all MQTT 3 features
• AWS IoT does not support the MQTT 5 specification and
doesn't support all MQTT 3 features
•
Cloud Services don't offer the MQTT ISO Standard
Risks when Using Cloud Platforms for
MQTT Connectivity
Copyright © by HiveMQ. All Rights Reserved.
Source: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-mqtt-support
Risks when Using Cloud Platforms for
MQTT Connectivity
Copyright © by HiveMQ. All Rights Reserved.
Source: https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html
Risks when Using Cloud Platforms for
MQTT Connectivity
Copyright © by HiveMQ. All Rights Reserved.
• Pricing may change at any time for most cloud vendors (including
AWS and Azure)
• Pricing for MQTT services usually consists of many variables which
makes it VERY hard to calculate the actual costs upfront
‣ Only specific MQTT packets are counted and a single packet can
count as multiple packets if it has large payload
‣ Distinction between incoming and outgoing traffic
‣ Sometimes concepts as connectivity duration + traffic + processing
rules are used together with a lot of other variables
‣ Integrating other services usually also adds more variables
• Usually the prices for POCs are extremely low but actual production
workload gets incredibly expensive
Hard to calculate costs upfront
Risks when Using Cloud Platforms for
MQTT Connectivity
Copyright © by HiveMQ. All Rights Reserved.
How to Fix?
• Usually the connectivity layer (MQTT Broker) is HOSTED at a
cloud provider but not proprietary cloud-specific services are
used
• Use a MQTT broker that is built for high-availability and has
industry references
• Don't use open source software like mosquitto for mission-
critical deployments (fine for testing, though)
• Use a vendor that can integrate with the value-added services
of your cloud providers (like Device Management, ...)
• If it's mission critical, make sure the vendor has good SLAs
and is responsive
Use a vendor that supports 100% of the MQTT ISO standard in a
cloud agnostic way
Copyright © by HiveMQ. All Rights Reserved.
INTEROPERABLE DATA EXCHANGE
Copyright © by HiveMQ. All Rights Reserved.
Interoperable Data Exchange
• MQTT is data agnostic, it can carry any payload up to 256MB
• MQTT supports content types that describes the payload
• Usual data formats for include
‣ Protocol Buffers (tiny and very efficient, supports schema
evolution)
‣ JSON (human readable and widely accepted)
‣ XML (heavyweight, human readable, easy to validate)
‣ Avro (efficient, support schema evolution)
Copyright © by HiveMQ. All Rights Reserved.
The Babble Fish
Copyright © by HiveMQ. All Rights Reserved.
NON-DOMAIN SPECIFIC SEMANTICS &
INTEROPERABILITY ARE SCIENCE-FICTION
Copyright © by HiveMQ. All Rights Reserved.
Ok, but how to do
domain specific data
interoperability?
Copyright © by HiveMQ. All Rights Reserved.
VDA Publication
https://www.vda.de/dam/vda/publications/2019/Logistik/VDA5050.pdf
Copyright © by HiveMQ. All Rights Reserved.
Interoperable Data Exchange with MQTT
• Domain specific knowledge needs to be documented and agreed
upon by major industry players
• Best practice: Offer data validation schemas
• MQTT brokers can add validation rules for topics
• OPC UA companion specifications for data models can also be used
with MQTT
Copyright © by HiveMQ. All Rights Reserved.
SECURITY
Copyright © by HiveMQ. All Rights Reserved.
MQTT Security
• TLS for transport encryption
• Pluggable authentication and authorization mechanisms
‣ X509 client certificates possible
‣ OAuth 2.0 and OpenID possible
‣ LDAP / Active Directory possible
‣ Any database access as credential store possible
‣ RBAC
• VERY fine grained permissions possible based on
‣ ip addresses
‣ topics + actions (pub/sub)
‣ features (retained, shared subscriptions, qos, ...)
MQTT is built for secure communication
Copyright © by HiveMQ. All Rights Reserved.
MQTT DETAILS
Copyright © by HiveMQ. All Rights Reserved.
MQTT Topics
Copyright © by HiveMQ. All Rights Reserved.
MQTT Topics
• Dynamic
• Very lightweight
• Queuing (QoS > 0)
• Wildcards (+ and #)
• Hierarchically
Copyright © by HiveMQ. All Rights Reserved.
MQTT Topics
• UTF-8 string - Used for message filtering
myhome / groundfloor / livingroom / temperature
Topic level
Separator
Topic levelTopic level
• Each topic level is separated by a forward slash
• Each topic contains at least 1 character, may contain spaces, is case sensitive
Copyright © by HiveMQ. All Rights Reserved.
MQTT Topics
Single level: + myhome / groundfloor / + / temperature
Topic levelTopic level
Topic level
Separator
Only one level
Single level: #
myhome / groundfloor / #
Topic levelTopic level
multi-level
Wildcard
Only at the end
Multiple topic levels
Copyright © by HiveMQ. All Rights Reserved.
factory1
MQTT Topics
/ /
floor1
floor2
plc1
plc2
plc1
plc2
Copyright © by HiveMQ. All Rights Reserved.
factory1
MQTT Topics
/ /
floor1
floor2
plc1
plc2
plc1
plc2
PLC Data 1 from floor1: factory1/floor1/plc1
Copyright © by HiveMQ. All Rights Reserved.
factory1
MQTT Topics
/ /
floor1
floor2
plc1
plc2
plc1
plc2
All Data from floor2: factory1/floor2/#
Copyright © by HiveMQ. All Rights Reserved.
factory1
MQTT Topics
/ /
floor1
floor2
plc1
plc2
plc1
plc2
All Data from deathstar: factory1/#
Copyright © by HiveMQ. All Rights Reserved.
Quality of Service (QoS)
Copyright © by HiveMQ. All Rights Reserved.
MQTT QoS
QoS 1
QoS 2
QoS 0
QoS 0
QoS 1
QoS 2
At most once delivery
At least once delivery
Exactly once delivery
Copyright © by HiveMQ. All Rights Reserved.
Retained Messages
Copyright © by HiveMQ. All Rights Reserved.
Retained Messages
• Clients receive retained message after
subscription
• The client decides if a message should be
retained
• Broker saves the last message for a given
topic
• „Last Known Good Value“
Copyright © by HiveMQ. All Rights Reserved.
Last Testament & Will
Copyright © by HiveMQ. All Rights Reserved.
Last Will & Testament
• Useful to implement „on/off“
• Real Push
• Broker sends message after client „death“
• Client defines LWT
Copyright © by HiveMQ. All Rights Reserved.
Persistent Sessions
Copyright © by HiveMQ. All Rights Reserved.
Persistent Session
• Queuing for QoS > 0
• Client decides if he wants to use persistent
sessions
• Broker saves Client Sessions
Connect
Subscribe
device/+/status
device/12/status: „1“
Re-Connect
device/12/status: „1“
1st
2nd
Copyright © by HiveMQ. All Rights Reserved.
Request / Response
Copyright © by HiveMQ. All Rights Reserved.
Request / Response
Copyright © by HiveMQ. All Rights Reserved.
Request / Response
• Pattern for „business ACKs“
• Request /Response is a pattern that is also
available for MQTT 3.1.1
• Publishing Client must subscribe to a response
topic prior to sending data
• „Request Response Information“ Header for
response topic
• „Correlation Data“ header for correlation of
request/response
Copyright © by HiveMQ. All Rights Reserved.
Shared Subscriptions
Copyright © by HiveMQ. All Rights Reserved.
Shared Subscriptions
* HiveMQ fully supports all optional features, including this feature
• Client Load Balancing. Multiple clients share the
same subscription
• Special Syntax: $share/{ID}/my/topic
• Useful for scaling out backend subscribers
• Also supported by HiveMQ for MQTT 3.1 and
MQTT 3.1.1
• Up-/Downscaling of clients at runtime possible.
Perfect for cloud native scenarios (Kubernetes, …)
• Optional feature, not supported by all vendors*
Copyright © by HiveMQ. All Rights Reserved.
Shared Subscriptions
Copyright © by HiveMQ. All Rights Reserved.
User Properties
Copyright © by HiveMQ. All Rights Reserved.
User Properties
• User Defined Metadata Headers
• Can be part of most MQTT packets
• UTF-8 encoded Strings
• An unlimited number of user properties can be
added
Copyright © by HiveMQ. All Rights Reserved.
THANK
YOU
Dominik Obermaier
@dobermai
linkedin.com/in/dobermai/
dominik.obermaier@hivemq.com
Contact

More Related Content

PDF
Modernizing the Manufacturing Industry with Kafka and MQTT
PPTX
MQTT 5: Why you need it and potential pitfalls
PPTX
Inntroduction to MQTT Sparkplug with HiveMQ and Opto22
PDF
Building a reliable and scalable IoT platform with MongoDB and HiveMQ
PDF
HiveMQ Cloud - The Cloud Native IoT Messaging Layer
PDF
A pure Java MQTT Stack for IoT
PDF
Lightweight and scalable IoT Messaging with MQTT
PDF
In search of the perfect IoT Stack - Scalable IoT Architectures with MQTT
Modernizing the Manufacturing Industry with Kafka and MQTT
MQTT 5: Why you need it and potential pitfalls
Inntroduction to MQTT Sparkplug with HiveMQ and Opto22
Building a reliable and scalable IoT platform with MongoDB and HiveMQ
HiveMQ Cloud - The Cloud Native IoT Messaging Layer
A pure Java MQTT Stack for IoT
Lightweight and scalable IoT Messaging with MQTT
In search of the perfect IoT Stack - Scalable IoT Architectures with MQTT

What's hot (20)

PDF
HiveMQ + Kafka: The ideal solution for IoT MQTT data integration
PDF
Lightweight and scalable IoT Architectures with MQTT
PPTX
Ignition Edge: Simplifying the Edge of the Network
PPTX
Pushing the Boundaries of Data Visualization
PPTX
Cybersecurity Spotlight: Looking under the Hood at Data Breaches and Hardenin...
PDF
What's the Right Messaging Standard for the IoT?
PDF
IBM MQ Light @ Capitalware's MQTC 2.0.1.4 conference
PPTX
Microservices K8S
PPTX
Open and Secure SCADA: Efficient and Economical Control, Without the Risk
PDF
IoT Meetup HiveMQ and MQTT
PDF
5G in Brownfield how SDN makes 5G Deployments Work
PPTX
Don't Architect a Real-Time System that Can't Scale
PDF
The Inside Story: Leveraging the IIC's Industrial Internet Security Framework
PDF
Round Solution_english_webinar_28_01_4_LI
PPTX
Intro to IoT & the role of LwM2M Technologies (Internet of Things World 2017,...
PDF
Distributed Communication and Control for a Network of Melting Probes in Extr...
PDF
IoT Seminar (Jan. 2016) - (7) joaquin prado - oma developer toolkit
PDF
Why OpenDaylight
PPTX
What's new in the integrated architecture hardware
PPTX
IoTlondon - mbed based IoT Gateway talk
HiveMQ + Kafka: The ideal solution for IoT MQTT data integration
Lightweight and scalable IoT Architectures with MQTT
Ignition Edge: Simplifying the Edge of the Network
Pushing the Boundaries of Data Visualization
Cybersecurity Spotlight: Looking under the Hood at Data Breaches and Hardenin...
What's the Right Messaging Standard for the IoT?
IBM MQ Light @ Capitalware's MQTC 2.0.1.4 conference
Microservices K8S
Open and Secure SCADA: Efficient and Economical Control, Without the Risk
IoT Meetup HiveMQ and MQTT
5G in Brownfield how SDN makes 5G Deployments Work
Don't Architect a Real-Time System that Can't Scale
The Inside Story: Leveraging the IIC's Industrial Internet Security Framework
Round Solution_english_webinar_28_01_4_LI
Intro to IoT & the role of LwM2M Technologies (Internet of Things World 2017,...
Distributed Communication and Control for a Network of Melting Probes in Extr...
IoT Seminar (Jan. 2016) - (7) joaquin prado - oma developer toolkit
Why OpenDaylight
What's new in the integrated architecture hardware
IoTlondon - mbed based IoT Gateway talk
Ad

Similar to MQTT AS A KEY TECHNOLOGY FOR INDUSTRY 4.0 & IIoT (20)

PDF
Introducing HiveMQ Cloud
PDF
HiveMQ Cloud Webinar
PDF
HiveMQ Webinar: Lightweight and scalable IoT Messaging with MQTT
PDF
Lightweight and Scalable IoT Messaging with MQTT
PDF
MQTT.fx on HiveMQ Cloud Testing MQTT in the Cloud
PDF
Mqtt.fx on hive mq cloud
PDF
Debugging MQTT Client Communications With MQTT.fx and HiveMQ Cloud
PDF
Best Practices Using MQTT to Connect Millions of IoT Devices
PDF
Back to Basics: An Introduction to MQTT
PPTX
InduSoft Web Studio and MQTT for Internet of Things Applications
PDF
Software-Infrastrukturen modernisieren in der Produktion - Digitale Transform...
PDF
Building Scalable & Reliable MQTT Clients for Enterprise Computing
PDF
MQTT 5 - Why You Need It and Potential Pitfalls
PDF
Building Scalable & Reliable MQTT Clients for Enterprise Computing
PDF
Industrial transformation-simplified-with-mqtt-and-sparkplug
PDF
IoT Security Issues and MQTT
PDF
Modernizing the Manufacturing Industry with MQTT and Kafka
PDF
MQTT - The Key to Scalable Reliable Connected Car Platforms
PDF
MQTT 101 - Getting started with the lightweight IoT Protocol
PDF
Best Practices for Streaming Connected Car Data with MQTT & Kafka
Introducing HiveMQ Cloud
HiveMQ Cloud Webinar
HiveMQ Webinar: Lightweight and scalable IoT Messaging with MQTT
Lightweight and Scalable IoT Messaging with MQTT
MQTT.fx on HiveMQ Cloud Testing MQTT in the Cloud
Mqtt.fx on hive mq cloud
Debugging MQTT Client Communications With MQTT.fx and HiveMQ Cloud
Best Practices Using MQTT to Connect Millions of IoT Devices
Back to Basics: An Introduction to MQTT
InduSoft Web Studio and MQTT for Internet of Things Applications
Software-Infrastrukturen modernisieren in der Produktion - Digitale Transform...
Building Scalable & Reliable MQTT Clients for Enterprise Computing
MQTT 5 - Why You Need It and Potential Pitfalls
Building Scalable & Reliable MQTT Clients for Enterprise Computing
Industrial transformation-simplified-with-mqtt-and-sparkplug
IoT Security Issues and MQTT
Modernizing the Manufacturing Industry with MQTT and Kafka
MQTT - The Key to Scalable Reliable Connected Car Platforms
MQTT 101 - Getting started with the lightweight IoT Protocol
Best Practices for Streaming Connected Car Data with MQTT & Kafka
Ad

More from Dominik Obermaier (13)

PPTX
Kafka Summit 2021 - Why MQTT and Kafka are a match made in heaven
PDF
MQTT 5 - What's New?
PDF
Scaling MQTT - Webinar with Elastic Beam
PDF
MQTT Deep Dive Workshop [GERMAN]
PDF
Securing MQTT - BuildingIoT 2016 slides
PDF
An introduction to MQTT - Pub / Sub for the masses
PDF
Pub/Sub for the masses- Ein Einführungsworkshop in MQTT [GERMAN]
PDF
IoT with MQTT and Paho for Webpages - Eclipse Democamp München 2014
PDF
JAX 2014 - M2M for Java Developers with MQTT
PDF
Push! - MQTT for the Internet of Things
PDF
Eclipse Democamps 2013 - M2M for Java Developers with MQTT
PDF
Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...
PDF
M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013
Kafka Summit 2021 - Why MQTT and Kafka are a match made in heaven
MQTT 5 - What's New?
Scaling MQTT - Webinar with Elastic Beam
MQTT Deep Dive Workshop [GERMAN]
Securing MQTT - BuildingIoT 2016 slides
An introduction to MQTT - Pub / Sub for the masses
Pub/Sub for the masses- Ein Einführungsworkshop in MQTT [GERMAN]
IoT with MQTT and Paho for Webpages - Eclipse Democamp München 2014
JAX 2014 - M2M for Java Developers with MQTT
Push! - MQTT for the Internet of Things
Eclipse Democamps 2013 - M2M for Java Developers with MQTT
Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...
M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
PDF
Comparative analysis of machine learning models for fake news detection in so...
PDF
Co-training pseudo-labeling for text classification with support vector machi...
DOCX
search engine optimization ppt fir known well about this
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
PPTX
MuleSoft-Compete-Deck for midddleware integrations
PDF
Lung cancer patients survival prediction using outlier detection and optimize...
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PDF
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PPTX
Module 1 Introduction to Web Programming .pptx
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PDF
Auditboard EB SOX Playbook 2023 edition.
PPTX
Training Program for knowledge in solar cell and solar industry
PPTX
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
PDF
Advancing precision in air quality forecasting through machine learning integ...
PDF
sustainability-14-14877-v2.pddhzftheheeeee
NewMind AI Weekly Chronicles – August ’25 Week IV
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
Comparative analysis of machine learning models for fake news detection in so...
Co-training pseudo-labeling for text classification with support vector machi...
search engine optimization ppt fir known well about this
Early detection and classification of bone marrow changes in lumbar vertebrae...
Convolutional neural network based encoder-decoder for efficient real-time ob...
Enhancing plagiarism detection using data pre-processing and machine learning...
MuleSoft-Compete-Deck for midddleware integrations
Lung cancer patients survival prediction using outlier detection and optimize...
Improvisation in detection of pomegranate leaf disease using transfer learni...
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
The influence of sentiment analysis in enhancing early warning system model f...
Module 1 Introduction to Web Programming .pptx
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
Auditboard EB SOX Playbook 2023 edition.
Training Program for knowledge in solar cell and solar industry
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
Advancing precision in air quality forecasting through machine learning integ...
sustainability-14-14877-v2.pddhzftheheeeee

MQTT AS A KEY TECHNOLOGY FOR INDUSTRY 4.0 & IIoT

  • 1. Copyright © by HiveMQ. All Rights Reserved. MQTT AS A KEY TECHNOLOGY FOR INDUSTRY 4.0 & IIoT
  • 2. Copyright © by HiveMQ. All Rights Reserved. WELCOME • HiveMQ CTO • Strong background in distributed and large scale systems architecture • OASIS MQTT TC Member • Author of „The Technical Foundations of IoT“ • Conference Speaker and Author • Program committee member for German and international IoT conferences Dominik Obermaier @dobermai linkedin.com/in/dobermai/
  • 3. Copyright © by HiveMQ. All Rights Reserved. We Will Talk Today About... • Why major automotive OEMs chose MQTT for in-factory Industry 4.0 and IIoT use cases (including case studies!) • Why MQTT is a key technology for IIoT and Industry 4.0 • Why not every cloud vendor delivers what they promise when it comes to MQTT (including the most common pitfalls) • How MQTT works and all relevant features • How to achieve interoperability with MQTT
  • 4. Copyright © by HiveMQ. All Rights Reserved. MQTT INTRODUCTION
  • 5. Copyright © by HiveMQ. All Rights Reserved. What is MQTT? • Binary • Easy • Publish/Subscribe • Minimal Overhead • (I)IoT Messaging Protocol • Data Agnostic • Designed for reliable communication over unreliable channels
  • 6. Copyright © by HiveMQ. All Rights Reserved. MQTT Overview • Binary with minimal overhead • Persistent (offline) sessions • Retained Messages • 3 QoS Levels • (I)IoT Messaging Protocol
  • 7. Copyright © by HiveMQ. All Rights Reserved. MQTT Use Cases • Connected Car • Industry 4.0 / IIoT • Logistics / Transportation • (IoT) Messaging Middleware • Telecommunications
  • 8. Copyright © by HiveMQ. All Rights Reserved. MQTT Use Cases • Push Communication • Reliable Communication over unreliable networks • Constrained Devices • Low Bandwidth and High Latency • Industrial Message Bus
  • 9. Copyright © by HiveMQ. All Rights Reserved. Publish / Subscribe
  • 10. Copyright © by HiveMQ. All Rights Reserved. Protocol Details • Heartbeat mechanism • Persistent TCP connections • Also works over websockets • IPv4 and IPv6 supported • MQTT requires TCP/IP • Clean & Persistent Sessions • QoS levels for message delivery guarantees • TLS in the mix for professional deployments MQTT TCP IP 5-7 ISO/OSI Layer 4 ISO/OSI Layer 3 ISO/OSI Layer
  • 11. Copyright © by HiveMQ. All Rights Reserved. MQTT Pub/Sub Advantages • Push Communication • Message filtering based on subjects topics • Synchronization Decoupling • Time Decoupling • Space Decoupling • Dynamic Topics
  • 12. Copyright © by HiveMQ. All Rights Reserved. MQTT HISTORY
  • 13. Copyright © by HiveMQ. All Rights Reserved. 2018 MQTT 5 officially released 2013 HiveMQ 1.3 released 2013 OASIS TC formed 2014 MQTT 3.1.1 officially released 2018 HiveMQ 4 has MQTT 5 support2019 HiveMQ MQTT Client 1.0 released 2012 Mosquitto 1.0 released 2010 MQTT 3.1 opened as royalty free protocol 1999 MQTT invented for oil pipeline monitoring
  • 14. Copyright © by HiveMQ. All Rights Reserved. The MQTT TC
  • 15. Copyright © by HiveMQ. All Rights Reserved. We will talk today about...MQTT Popularity over Time
  • 16. Copyright © by HiveMQ. All Rights Reserved. Where does MQTT fit in?
  • 17. Copyright © by HiveMQ. All Rights Reserved. Cloud Communication
  • 18. Copyright © by HiveMQ. All Rights Reserved. Cloud Communication
  • 19. Copyright © by HiveMQ. All Rights Reserved. Factory IIoT Bus
  • 20. Copyright © by HiveMQ. All Rights Reserved. Consuming Applications: Data Warehouse, Analytics Tools, Reporting, Monitoring Application Area Cloud Connector Smart Sensors Power, Consumption, Vibrations, Temperature, Humidity… IIoT Area Automation Area Automation Sensors PLS/STS IIoT MQTT Broker
  • 21. Copyright © by HiveMQ. All Rights Reserved. MULTI CLOUD ISO CONNECTIVITY
  • 22. Copyright © by HiveMQ. All Rights Reserved. • MQTT is an ISO Standard (ISO/IEC 20922:2016) • The ISO standard is clear about the features required for interoperable communication • Best practice is to have a central connectivity layer • Standard conform vendors are replaceable by the the customer, so the vendor risk is reduced significantly for customers • While usually not a concern in the PoC phase, Multi-Cloud capabilities for the MQTT broker are extremely important Multi Cloud & ISO
  • 23. Copyright © by HiveMQ. All Rights Reserved. Cloud Vendors & Third Party Services Connectivity Layer running on any or multiple clouds Devices, Factories and "Things" Multi-Cloud High available MQTT broker (multi-cloud possible) Other 3rd party services
  • 24. Copyright © by HiveMQ. All Rights Reserved. Cloud Vendors & Third Party Services Connectivity Layer running on any or multiple clouds Devices, Factories and "Things" Multi-Cloud Other 3rd party services Device Management AWS IoT Big Data Kinesis IoT Hub Data Lakes Machine Learning Event Hubs
  • 25. Copyright © by HiveMQ. All Rights Reserved. HiveMQ
  • 26. Copyright © by HiveMQ. All Rights Reserved. HiveMQ
  • 27. Copyright © by HiveMQ. All Rights Reserved. Risks when Using Cloud Platforms for MQTT Connectivity • SLAs of cloud vendor services usually not acceptable for mission- critical cloud data pipelines ‣ Azure offers 99,9% uptime for IoTHub [1] ‣ AWS offers 99,9% uptime for IoT Core [2] ‣ 99,9% uptime guarantees is approximately 9 hours downtime per year • Cloud Vendors don't offer stable API guarantees ‣ Can change or terminate any service at any time ‣ they notice 12 months in advance, though ‣ Many customers require 15+ years guarantees because field device updates are sometimes hard or impossible • No price stability guarantees from cloud vendors [3] [1] https://azure.microsoft.com/en-gb/support/legal/sla/iot-hub/v1_2/ [2] https://aws.amazon.com/iot-core/sla/ [3] https://aws.amazon.com/agreement/ Vendor lock-in to specific clouds (AWS, Azure, GCP) too risky for industry leaders
  • 28. Copyright © by HiveMQ. All Rights Reserved. • Only subsets of the protocol are supported and MQTT can only be used in a very opinionated way • Azure does not support the MQTT 5 specification and doesn't support all MQTT 3 features • AWS IoT does not support the MQTT 5 specification and doesn't support all MQTT 3 features • Cloud Services don't offer the MQTT ISO Standard Risks when Using Cloud Platforms for MQTT Connectivity
  • 29. Copyright © by HiveMQ. All Rights Reserved. Source: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-mqtt-support Risks when Using Cloud Platforms for MQTT Connectivity
  • 30. Copyright © by HiveMQ. All Rights Reserved. Source: https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html Risks when Using Cloud Platforms for MQTT Connectivity
  • 31. Copyright © by HiveMQ. All Rights Reserved. • Pricing may change at any time for most cloud vendors (including AWS and Azure) • Pricing for MQTT services usually consists of many variables which makes it VERY hard to calculate the actual costs upfront ‣ Only specific MQTT packets are counted and a single packet can count as multiple packets if it has large payload ‣ Distinction between incoming and outgoing traffic ‣ Sometimes concepts as connectivity duration + traffic + processing rules are used together with a lot of other variables ‣ Integrating other services usually also adds more variables • Usually the prices for POCs are extremely low but actual production workload gets incredibly expensive Hard to calculate costs upfront Risks when Using Cloud Platforms for MQTT Connectivity
  • 32. Copyright © by HiveMQ. All Rights Reserved. How to Fix? • Usually the connectivity layer (MQTT Broker) is HOSTED at a cloud provider but not proprietary cloud-specific services are used • Use a MQTT broker that is built for high-availability and has industry references • Don't use open source software like mosquitto for mission- critical deployments (fine for testing, though) • Use a vendor that can integrate with the value-added services of your cloud providers (like Device Management, ...) • If it's mission critical, make sure the vendor has good SLAs and is responsive Use a vendor that supports 100% of the MQTT ISO standard in a cloud agnostic way
  • 33. Copyright © by HiveMQ. All Rights Reserved. INTEROPERABLE DATA EXCHANGE
  • 34. Copyright © by HiveMQ. All Rights Reserved. Interoperable Data Exchange • MQTT is data agnostic, it can carry any payload up to 256MB • MQTT supports content types that describes the payload • Usual data formats for include ‣ Protocol Buffers (tiny and very efficient, supports schema evolution) ‣ JSON (human readable and widely accepted) ‣ XML (heavyweight, human readable, easy to validate) ‣ Avro (efficient, support schema evolution)
  • 35. Copyright © by HiveMQ. All Rights Reserved. The Babble Fish
  • 36. Copyright © by HiveMQ. All Rights Reserved. NON-DOMAIN SPECIFIC SEMANTICS & INTEROPERABILITY ARE SCIENCE-FICTION
  • 37. Copyright © by HiveMQ. All Rights Reserved. Ok, but how to do domain specific data interoperability?
  • 38. Copyright © by HiveMQ. All Rights Reserved. VDA Publication https://www.vda.de/dam/vda/publications/2019/Logistik/VDA5050.pdf
  • 39. Copyright © by HiveMQ. All Rights Reserved. Interoperable Data Exchange with MQTT • Domain specific knowledge needs to be documented and agreed upon by major industry players • Best practice: Offer data validation schemas • MQTT brokers can add validation rules for topics • OPC UA companion specifications for data models can also be used with MQTT
  • 40. Copyright © by HiveMQ. All Rights Reserved. SECURITY
  • 41. Copyright © by HiveMQ. All Rights Reserved. MQTT Security • TLS for transport encryption • Pluggable authentication and authorization mechanisms ‣ X509 client certificates possible ‣ OAuth 2.0 and OpenID possible ‣ LDAP / Active Directory possible ‣ Any database access as credential store possible ‣ RBAC • VERY fine grained permissions possible based on ‣ ip addresses ‣ topics + actions (pub/sub) ‣ features (retained, shared subscriptions, qos, ...) MQTT is built for secure communication
  • 42. Copyright © by HiveMQ. All Rights Reserved. MQTT DETAILS
  • 43. Copyright © by HiveMQ. All Rights Reserved. MQTT Topics
  • 44. Copyright © by HiveMQ. All Rights Reserved. MQTT Topics • Dynamic • Very lightweight • Queuing (QoS > 0) • Wildcards (+ and #) • Hierarchically
  • 45. Copyright © by HiveMQ. All Rights Reserved. MQTT Topics • UTF-8 string - Used for message filtering myhome / groundfloor / livingroom / temperature Topic level Separator Topic levelTopic level • Each topic level is separated by a forward slash • Each topic contains at least 1 character, may contain spaces, is case sensitive
  • 46. Copyright © by HiveMQ. All Rights Reserved. MQTT Topics Single level: + myhome / groundfloor / + / temperature Topic levelTopic level Topic level Separator Only one level Single level: # myhome / groundfloor / # Topic levelTopic level multi-level Wildcard Only at the end Multiple topic levels
  • 47. Copyright © by HiveMQ. All Rights Reserved. factory1 MQTT Topics / / floor1 floor2 plc1 plc2 plc1 plc2
  • 48. Copyright © by HiveMQ. All Rights Reserved. factory1 MQTT Topics / / floor1 floor2 plc1 plc2 plc1 plc2 PLC Data 1 from floor1: factory1/floor1/plc1
  • 49. Copyright © by HiveMQ. All Rights Reserved. factory1 MQTT Topics / / floor1 floor2 plc1 plc2 plc1 plc2 All Data from floor2: factory1/floor2/#
  • 50. Copyright © by HiveMQ. All Rights Reserved. factory1 MQTT Topics / / floor1 floor2 plc1 plc2 plc1 plc2 All Data from deathstar: factory1/#
  • 51. Copyright © by HiveMQ. All Rights Reserved. Quality of Service (QoS)
  • 52. Copyright © by HiveMQ. All Rights Reserved. MQTT QoS QoS 1 QoS 2 QoS 0 QoS 0 QoS 1 QoS 2 At most once delivery At least once delivery Exactly once delivery
  • 53. Copyright © by HiveMQ. All Rights Reserved. Retained Messages
  • 54. Copyright © by HiveMQ. All Rights Reserved. Retained Messages • Clients receive retained message after subscription • The client decides if a message should be retained • Broker saves the last message for a given topic • „Last Known Good Value“
  • 55. Copyright © by HiveMQ. All Rights Reserved. Last Testament & Will
  • 56. Copyright © by HiveMQ. All Rights Reserved. Last Will & Testament • Useful to implement „on/off“ • Real Push • Broker sends message after client „death“ • Client defines LWT
  • 57. Copyright © by HiveMQ. All Rights Reserved. Persistent Sessions
  • 58. Copyright © by HiveMQ. All Rights Reserved. Persistent Session • Queuing for QoS > 0 • Client decides if he wants to use persistent sessions • Broker saves Client Sessions Connect Subscribe device/+/status device/12/status: „1“ Re-Connect device/12/status: „1“ 1st 2nd
  • 59. Copyright © by HiveMQ. All Rights Reserved. Request / Response
  • 60. Copyright © by HiveMQ. All Rights Reserved. Request / Response
  • 61. Copyright © by HiveMQ. All Rights Reserved. Request / Response • Pattern for „business ACKs“ • Request /Response is a pattern that is also available for MQTT 3.1.1 • Publishing Client must subscribe to a response topic prior to sending data • „Request Response Information“ Header for response topic • „Correlation Data“ header for correlation of request/response
  • 62. Copyright © by HiveMQ. All Rights Reserved. Shared Subscriptions
  • 63. Copyright © by HiveMQ. All Rights Reserved. Shared Subscriptions * HiveMQ fully supports all optional features, including this feature • Client Load Balancing. Multiple clients share the same subscription • Special Syntax: $share/{ID}/my/topic • Useful for scaling out backend subscribers • Also supported by HiveMQ for MQTT 3.1 and MQTT 3.1.1 • Up-/Downscaling of clients at runtime possible. Perfect for cloud native scenarios (Kubernetes, …) • Optional feature, not supported by all vendors*
  • 64. Copyright © by HiveMQ. All Rights Reserved. Shared Subscriptions
  • 65. Copyright © by HiveMQ. All Rights Reserved. User Properties
  • 66. Copyright © by HiveMQ. All Rights Reserved. User Properties • User Defined Metadata Headers • Can be part of most MQTT packets • UTF-8 encoded Strings • An unlimited number of user properties can be added
  • 67. Copyright © by HiveMQ. All Rights Reserved. THANK YOU Dominik Obermaier @dobermai linkedin.com/in/dobermai/ [email protected] Contact