SlideShare a Scribd company logo
MQTT meets AMQP
for reliable messaging
By Haci Murat Yaman 25/6/2023
https://www.linkedin.com/in/muratyaman/
MQTT: Message Queuing Telemetry Transport
“... lightweight messaging protocol designed for efficient communication between
devices in constrained networks”
It is a Pub/Sub protocol.
It is not a message queue.
MQTT: Advantages
● Lightweight and Efficient in terms of bandwidth & processing power
● Persistent Sessions:
○ Clients can maintain their subscriptions and message queues even if they temporarily disconnect from the
broker; this feature ensures message delivery to clients that were offline during a period of unreliable
connectivity. This is misleading!
● Publish/Subscribe Model:
○ Publishers send messages to a broker; subscribers receive messages from the broker.
● Asynchronous Communication:
○ The sender does not need to wait for an immediate response from the receiver.
● Quality of Service (QoS) Levels: This is very misleading!
○ 0 (At most once): Messages are delivered once but may be lost or duplicated.
○ 1 (At least once): Messages are guaranteed to be delivered at least once, but duplicates may occur.
○ 2 (Exactly once): Messages are ensured to be delivered exactly once by using a two-step handshake
process.
● Scalability and Flexibility: a broker handle many devices → suitable for IoT
MQTT: Disadvantages
● Increased Network Overhead:
○ esp. in extremely constrained networks or when dealing with a large number of small messages
● Lack of Built-in Security:
○ Even though it can work over TLS; MQTT applications should implement authentication.
● Potential Message Loss:
○ While higher QoS levels (such as QoS 1 and QoS 2) provide reliability, they can introduce additional
overhead and latency, impacting the overall efficiency of the communication.
● Lack of Standardized Support for Request-Response Communication:
○ Its pub/sub model is primarily designed for asynchronous communication.
● Limited Broker Features:
○ Brokers typically focus on message routing and delivery.
○ Advanced features like message persistence depends on implementation.
● Bandwidth Consumption:
○ In scenarios with extremely low-bandwidth or high-cost data connections, the continuous
transmission of MQTT control packets, keep-alive messages, and subscription updates can impact
the overall data consumption.
AMQP: Advanced Message Queuing Protocol
“... a messaging protocol that provides a reliable and flexible means of
communication between applications or components in a distributed system.”
AMQP: Advantages
● Reliable Message Delivery:
○ It uses acknowledgments and delivery confirmations.
● Interoperability:
○ It provides a standard way of exchanging messages
● Scalability:
○ It supports distributed and scalable messaging architectures.
○ We can add more instances of the message broker or message queues.
● Message Routing and Filtering:
○ It provides flexible mechanisms for routing messages such as header-based, topic-based, content-based.
● Security:
○ It includes built-in security features like authentication and authorization mechanisms
● Vendor Neutrality:
○ It is an open and standardized protocol.
● Message Persistence:
○ It supports durable message queues.
● Monitoring and Management:
○ It includes mechanisms for tracking message rates, queue sizes, and other metrics
AMQP: Disadvantages
● Complexity:
○ It can be complex to set up and configure.
○ Learning Curve for Developers: Effort is required to implement message producers and consumers correctly.
○ Operational Complexity: It requires configuring queues, setting up routing rules, monitoring message flows,
and ensuring high availability and fault tolerance.
● Performance Overhead:
○ Robustness and reliability features come with performance overhead; i.e. due to acknowledgments,
confirmations, and message persistence
● Protocol Compatibility:
○ Implementations of senders and receivers may not be compatible.
● Limited Real-Time Messaging:
○ Even though it is capable of handling real-time messaging, it may not be the optimal choice for extremely low-
latency, high-frequency messaging scenarios.
● Scalability Challenges:
○ Managing large-scale deployments with high message volumes requires careful planning, monitoring, and
load balancing to ensure efficient resource utilization and avoid bottlenecks.
● Potential Vendor Lock-In:
○ There is possibility of vendor lock-in if you heavily rely on proprietary extensions or features.
Devices are connected.
Network is stable.
Unstable network
Unstable network
Conclusion
The proof of concept works!
Code repository: https://github.com/muratyaman/mqtt-meets-amqp
But more testing is needed esp. under heavy load.
Could this stack of MQTT & AMQP work better than MQTT or AMQP alone?

More Related Content

Similar to MQTT meets AMQP

MODULE-4_CCN.pptx
MODULE-4_CCN.pptxMODULE-4_CCN.pptx
MODULE-4_CCN.pptx
Dr. Shivashankar
 
AMQP.pdf
AMQP.pdfAMQP.pdf
AMQP.pdf
RitvikShukla6
 
IBM MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM MQ: Managing Workloads, Scaling and Availability with MQ ClustersIBM MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM MQ: Managing Workloads, Scaling and Availability with MQ Clusters
David Ware
 
Mqtt
MqttMqtt
Introduction to MQ Telemetry Transport (MQTT)
Introduction to MQ Telemetry Transport (MQTT)Introduction to MQ Telemetry Transport (MQTT)
Introduction to MQ Telemetry Transport (MQTT)
Amarjeetsingh Thakur
 
SOA Pattern-Asynchronous Queuing
SOA Pattern-Asynchronous QueuingSOA Pattern-Asynchronous Queuing
SOA Pattern-Asynchronous Queuing
WSO2
 
Where next for MQTT?
Where next for MQTT?Where next for MQTT?
Where next for MQTT?
Ian Craggs
 
AMQP with RabbitMQ
AMQP with RabbitMQAMQP with RabbitMQ
AMQP with RabbitMQ
Spyros Papageorgiou
 
Transport Layer In Computer Network
Transport Layer In Computer NetworkTransport Layer In Computer Network
Transport Layer In Computer Network
Destro Destro
 
Application Layer Protocols for the IoT
Application Layer Protocols for the IoTApplication Layer Protocols for the IoT
Application Layer Protocols for the IoT
Damien Magoni
 
Towards Improved Data Dissemination of Publish-Subscribe Systems
Towards Improved Data Dissemination of Publish-Subscribe SystemsTowards Improved Data Dissemination of Publish-Subscribe Systems
Towards Improved Data Dissemination of Publish-Subscribe Systems
Srinath Perera
 
Low Latency Mobile Messaging using MQTT
Low Latency Mobile Messaging using MQTTLow Latency Mobile Messaging using MQTT
Low Latency Mobile Messaging using MQTT
Henrik Sjöstrand
 
IAB-5039 : MQTT: A Protocol for the Internet of Things (InterConnect 2015)
IAB-5039 : MQTT: A Protocol for the Internet of Things (InterConnect 2015)IAB-5039 : MQTT: A Protocol for the Internet of Things (InterConnect 2015)
IAB-5039 : MQTT: A Protocol for the Internet of Things (InterConnect 2015)
PeterNiblett
 
Enterprise messaging with jms
Enterprise messaging with jmsEnterprise messaging with jms
Enterprise messaging with jms
Sridhar Reddy
 
Choosing the Right Firewall for Your Business.pdf
Choosing the Right Firewall for Your Business.pdfChoosing the Right Firewall for Your Business.pdf
Choosing the Right Firewall for Your Business.pdf
InfoRIPRASAITSolutio
 
Ranker jms implementation
Ranker jms implementationRanker jms implementation
Ranker jms implementation
EosSoftware
 
mqtt intro short
mqtt intro shortmqtt intro short
mqtt intro short
MahmutERKEN
 
RabbitMq
RabbitMqRabbitMq
RabbitMq
Ahmad Saif
 
Mqtt(Message queue telemetry protocol) presentation
Mqtt(Message queue telemetry protocol) presentation Mqtt(Message queue telemetry protocol) presentation
Mqtt(Message queue telemetry protocol) presentation
Piyush Rathi
 
Introduction to EMQ X Enterprise
Introduction to EMQ X EnterpriseIntroduction to EMQ X Enterprise
Introduction to EMQ X Enterprise
EMQ
 

Similar to MQTT meets AMQP (20)

MODULE-4_CCN.pptx
MODULE-4_CCN.pptxMODULE-4_CCN.pptx
MODULE-4_CCN.pptx
 
AMQP.pdf
AMQP.pdfAMQP.pdf
AMQP.pdf
 
IBM MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM MQ: Managing Workloads, Scaling and Availability with MQ ClustersIBM MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM MQ: Managing Workloads, Scaling and Availability with MQ Clusters
 
Mqtt
MqttMqtt
Mqtt
 
Introduction to MQ Telemetry Transport (MQTT)
Introduction to MQ Telemetry Transport (MQTT)Introduction to MQ Telemetry Transport (MQTT)
Introduction to MQ Telemetry Transport (MQTT)
 
SOA Pattern-Asynchronous Queuing
SOA Pattern-Asynchronous QueuingSOA Pattern-Asynchronous Queuing
SOA Pattern-Asynchronous Queuing
 
Where next for MQTT?
Where next for MQTT?Where next for MQTT?
Where next for MQTT?
 
AMQP with RabbitMQ
AMQP with RabbitMQAMQP with RabbitMQ
AMQP with RabbitMQ
 
Transport Layer In Computer Network
Transport Layer In Computer NetworkTransport Layer In Computer Network
Transport Layer In Computer Network
 
Application Layer Protocols for the IoT
Application Layer Protocols for the IoTApplication Layer Protocols for the IoT
Application Layer Protocols for the IoT
 
Towards Improved Data Dissemination of Publish-Subscribe Systems
Towards Improved Data Dissemination of Publish-Subscribe SystemsTowards Improved Data Dissemination of Publish-Subscribe Systems
Towards Improved Data Dissemination of Publish-Subscribe Systems
 
Low Latency Mobile Messaging using MQTT
Low Latency Mobile Messaging using MQTTLow Latency Mobile Messaging using MQTT
Low Latency Mobile Messaging using MQTT
 
IAB-5039 : MQTT: A Protocol for the Internet of Things (InterConnect 2015)
IAB-5039 : MQTT: A Protocol for the Internet of Things (InterConnect 2015)IAB-5039 : MQTT: A Protocol for the Internet of Things (InterConnect 2015)
IAB-5039 : MQTT: A Protocol for the Internet of Things (InterConnect 2015)
 
Enterprise messaging with jms
Enterprise messaging with jmsEnterprise messaging with jms
Enterprise messaging with jms
 
Choosing the Right Firewall for Your Business.pdf
Choosing the Right Firewall for Your Business.pdfChoosing the Right Firewall for Your Business.pdf
Choosing the Right Firewall for Your Business.pdf
 
Ranker jms implementation
Ranker jms implementationRanker jms implementation
Ranker jms implementation
 
mqtt intro short
mqtt intro shortmqtt intro short
mqtt intro short
 
RabbitMq
RabbitMqRabbitMq
RabbitMq
 
Mqtt(Message queue telemetry protocol) presentation
Mqtt(Message queue telemetry protocol) presentation Mqtt(Message queue telemetry protocol) presentation
Mqtt(Message queue telemetry protocol) presentation
 
Introduction to EMQ X Enterprise
Introduction to EMQ X EnterpriseIntroduction to EMQ X Enterprise
Introduction to EMQ X Enterprise
 

More from Haci Murat Yaman

The API Journey: GraphQL Specification and Implementation
The API Journey: GraphQL Specification and ImplementationThe API Journey: GraphQL Specification and Implementation
The API Journey: GraphQL Specification and Implementation
Haci Murat Yaman
 
The API Journey: from REST to GraphQL
The API Journey: from REST to GraphQLThe API Journey: from REST to GraphQL
The API Journey: from REST to GraphQL
Haci Murat Yaman
 
Node.js System: The Landing
Node.js System: The LandingNode.js System: The Landing
Node.js System: The Landing
Haci Murat Yaman
 
Node.js System: The Approach
Node.js System: The ApproachNode.js System: The Approach
Node.js System: The Approach
Haci Murat Yaman
 
The Saga of JavaScript and TypeScript: Part 1
The Saga of JavaScript and TypeScript: Part 1The Saga of JavaScript and TypeScript: Part 1
The Saga of JavaScript and TypeScript: Part 1
Haci Murat Yaman
 
The Saga of JavaScript and Typescript: in Deno land
The Saga of JavaScript and Typescript: in Deno landThe Saga of JavaScript and Typescript: in Deno land
The Saga of JavaScript and Typescript: in Deno land
Haci Murat Yaman
 

More from Haci Murat Yaman (6)

The API Journey: GraphQL Specification and Implementation
The API Journey: GraphQL Specification and ImplementationThe API Journey: GraphQL Specification and Implementation
The API Journey: GraphQL Specification and Implementation
 
The API Journey: from REST to GraphQL
The API Journey: from REST to GraphQLThe API Journey: from REST to GraphQL
The API Journey: from REST to GraphQL
 
Node.js System: The Landing
Node.js System: The LandingNode.js System: The Landing
Node.js System: The Landing
 
Node.js System: The Approach
Node.js System: The ApproachNode.js System: The Approach
Node.js System: The Approach
 
The Saga of JavaScript and TypeScript: Part 1
The Saga of JavaScript and TypeScript: Part 1The Saga of JavaScript and TypeScript: Part 1
The Saga of JavaScript and TypeScript: Part 1
 
The Saga of JavaScript and Typescript: in Deno land
The Saga of JavaScript and Typescript: in Deno landThe Saga of JavaScript and Typescript: in Deno land
The Saga of JavaScript and Typescript: in Deno land
 

Recently uploaded

Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 

Recently uploaded (20)

Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 

MQTT meets AMQP

  • 1. MQTT meets AMQP for reliable messaging By Haci Murat Yaman 25/6/2023 https://www.linkedin.com/in/muratyaman/
  • 2. MQTT: Message Queuing Telemetry Transport “... lightweight messaging protocol designed for efficient communication between devices in constrained networks” It is a Pub/Sub protocol. It is not a message queue.
  • 3. MQTT: Advantages ● Lightweight and Efficient in terms of bandwidth & processing power ● Persistent Sessions: ○ Clients can maintain their subscriptions and message queues even if they temporarily disconnect from the broker; this feature ensures message delivery to clients that were offline during a period of unreliable connectivity. This is misleading! ● Publish/Subscribe Model: ○ Publishers send messages to a broker; subscribers receive messages from the broker. ● Asynchronous Communication: ○ The sender does not need to wait for an immediate response from the receiver. ● Quality of Service (QoS) Levels: This is very misleading! ○ 0 (At most once): Messages are delivered once but may be lost or duplicated. ○ 1 (At least once): Messages are guaranteed to be delivered at least once, but duplicates may occur. ○ 2 (Exactly once): Messages are ensured to be delivered exactly once by using a two-step handshake process. ● Scalability and Flexibility: a broker handle many devices → suitable for IoT
  • 4. MQTT: Disadvantages ● Increased Network Overhead: ○ esp. in extremely constrained networks or when dealing with a large number of small messages ● Lack of Built-in Security: ○ Even though it can work over TLS; MQTT applications should implement authentication. ● Potential Message Loss: ○ While higher QoS levels (such as QoS 1 and QoS 2) provide reliability, they can introduce additional overhead and latency, impacting the overall efficiency of the communication. ● Lack of Standardized Support for Request-Response Communication: ○ Its pub/sub model is primarily designed for asynchronous communication. ● Limited Broker Features: ○ Brokers typically focus on message routing and delivery. ○ Advanced features like message persistence depends on implementation. ● Bandwidth Consumption: ○ In scenarios with extremely low-bandwidth or high-cost data connections, the continuous transmission of MQTT control packets, keep-alive messages, and subscription updates can impact the overall data consumption.
  • 5. AMQP: Advanced Message Queuing Protocol “... a messaging protocol that provides a reliable and flexible means of communication between applications or components in a distributed system.”
  • 6. AMQP: Advantages ● Reliable Message Delivery: ○ It uses acknowledgments and delivery confirmations. ● Interoperability: ○ It provides a standard way of exchanging messages ● Scalability: ○ It supports distributed and scalable messaging architectures. ○ We can add more instances of the message broker or message queues. ● Message Routing and Filtering: ○ It provides flexible mechanisms for routing messages such as header-based, topic-based, content-based. ● Security: ○ It includes built-in security features like authentication and authorization mechanisms ● Vendor Neutrality: ○ It is an open and standardized protocol. ● Message Persistence: ○ It supports durable message queues. ● Monitoring and Management: ○ It includes mechanisms for tracking message rates, queue sizes, and other metrics
  • 7. AMQP: Disadvantages ● Complexity: ○ It can be complex to set up and configure. ○ Learning Curve for Developers: Effort is required to implement message producers and consumers correctly. ○ Operational Complexity: It requires configuring queues, setting up routing rules, monitoring message flows, and ensuring high availability and fault tolerance. ● Performance Overhead: ○ Robustness and reliability features come with performance overhead; i.e. due to acknowledgments, confirmations, and message persistence ● Protocol Compatibility: ○ Implementations of senders and receivers may not be compatible. ● Limited Real-Time Messaging: ○ Even though it is capable of handling real-time messaging, it may not be the optimal choice for extremely low- latency, high-frequency messaging scenarios. ● Scalability Challenges: ○ Managing large-scale deployments with high message volumes requires careful planning, monitoring, and load balancing to ensure efficient resource utilization and avoid bottlenecks. ● Potential Vendor Lock-In: ○ There is possibility of vendor lock-in if you heavily rely on proprietary extensions or features.
  • 11. Conclusion The proof of concept works! Code repository: https://github.com/muratyaman/mqtt-meets-amqp But more testing is needed esp. under heavy load. Could this stack of MQTT & AMQP work better than MQTT or AMQP alone?