SlideShare a Scribd company logo
A Pure Java MQTT Stack
IoT at scale with open source technologies
Dominik Obermaier| CTO @ HiveMQ
Numberofusersinmillions
Numberofusersinmillions
PEOPLE ON THE INTERNET
Source IHS © 2016 IHS
DEVICES ON THE INTERNET
Key Industry Trend:
IoT & Connectivity
Introduction
• HiveMQ CTO
• Strong background in distributed
and large scale systems
architecture
• OASIS MQTT TC Member
• Author of “The Technical
Foundations of IoT”
• Conference Speaker
• Program committee member for
German and international IoT
conferences
Dominik
Obermaier
@dobermai
IoT Challenges • Unreliable communication
channels (e.g. mobile)
• Constrained Devices
• Low Bandwidth and High
Latency environments
• Bi-directional
communication required
• Security
• Instantaneous data
exchange
!7
A pure Java MQTT Stack for IoT
What is MQTT
• Most popular IoT
Messaging Protocol
• Minimal Overhead
• Publish / Subscribe
• Easy
• Binary
• Data Agnostic
• Designed for reliable
communication over
unreliable channels
• ISO Standard
!9
Use Cases • Push Communication
• Unreliable communication
channels (e.g. mobile)
• Constrained Devices
• Low Bandwidth and High
Latency environments
• Communication from
backend to IoT device
• Lightweight backen
communication
!10
A pure Java MQTT Stack for IoT
Source: https://iot.eclipse.org/resources/iot-developer-survey/iot-developer-survey-2019.pdf; 1717 participants
Source: https://iot.eclipse.org/resources/iot-developer-survey/iot-developer-survey-2019.pdf; 1717 participants
Source: https://iot.eclipse.org/resources/iot-developer-survey/iot-developer-survey-2019.pdf; 1717 participants
Publish / Subscribe
Confidential and Proprietary. Copyright © by dc-square GmbH. All Rights Reserved.
Pub/Sub
• lightweight protocol on top of TCP/IP
• Pub/Sub pattern
• de-coupling of sender and receiver
• central component: the broker
!16
Java Based Open
Source Stack
!18
Java ToolsJava Tools
HiveMQ
MQTT broker built for enterprise applications
Extensive plugin system
Scales to > 10 million of concurrent connections
OSS Community Edition available
Built for High Availability and used by 150+
of the largest IoT deployments in the world
Enterprise MQTT
Devices HiveMQ Enterprise
unreliable
network
Protocol
Integration
Enterprise Systems
• Kafka
• OAuth Server
• …
Kubernetes, Docker, OpenShift
Public or private cloud (AWS, MS Azure…) or on-premise
Backend
Enterprise MQTT
Devices HiveMQ Enterprise
unreliable
network
Protocol
Integration
Enterprise Systems
• Kafka
• OAuth Server
• …
Kubernetes, Docker, OpenShift
Public or private cloud (AWS, MS Azure…) or on-premise
Backend
HiveMQ Community Edition
Full-featured and lightweight Java MQTT Broker
Extensive plugin system
Ideal for Edge Devices and Java Applications
Apache 2 License
Foundation of HiveMQ Enterprisehttps://github.com/hivemq/hivemq-community-edition/
Extension System • Allows developers to integrate any
system
• Implement custom authentication
and authorization behavior
• Data forwarding to other backend
services
• Direct device communication
possible for other systems
• Modify MQTT packets and and
protocol behavior
• Hot Reload of Extensions possible
!24
Marketplace
• Pre-built Extensions for integration
with popular technologies
• Open Source Extensions available
• Commercial Extensions available
!25
A pure Java MQTT Stack for IoT
HiveMQ MQTT Client
Java based MQTT library
Developed by HiveMQ and BMW Car-IT
Built for devices and backends
Open Source (Apache 2)
Extremely fast and low overhead
Overview
3 API Styles: Simple,Future-based and Reactive
Designed for extreme throughput and low
memory consumption
Backpressure Support
Java based and licensed under the Apache 2 License
Full MQTT 5 & MQTT 3.1.1 Support
Features
Full MQTT 3.1.1 support
SSL / TLS (with optional native BoringSSL integration)
3 API Styles: Blocking,Non-Blocking,and Reactive
Websocket Support
Full MQTT 5 Support with all optional
features
Features
Automatic Reconnect
Offline Buffering
Websocket Transport Support
Server Failover
Message Persistence
Features
Backpressure Support
Additional MQTT 5 Features (e.g. Server Re-auth,…)
Pluggable Thread Pools
Dropwizard Metrics Integration
HTTP CONNECT Support
HiveMQ
MQTT Client
Use Cases
Big Data Systems
Enterprise Application
Server Environments
(Payara, Glassfish, …)
Benchmark Tools
Desktop applications as
well as mobile applications
All Java 8+ based MQTT
applications
Technologies - Internal
!34
Java ToolsDemo!
Java ToolsBonus
!37
HiveMQ Kafka
Extension
• Broker uses native Kafka protocol
• Full MQTT Features can be used
• Bi-directional producing and
consumption possible
• High Scalability and resilience.
• Extreme throughput. Can write
hundreds of thousands of MQTT
messages per second to Kafka
• Ideal for aggregating MQTT topics
to Kafka Firehose Topics
• Can write to multiple Kafka
Deployments
!38
A pure Java MQTT Stack for IoT
A pure Java MQTT Stack for IoT
Q & A
Time for Questions
Dominik
Obermaier
dominik.obermaier@hivemq.com
@dobermai
Get in touch
HiveMQ -
Enterprise MQTT Broker
www.hivemq.com
@hivemq

More Related Content

A pure Java MQTT Stack for IoT