SlideShare a Scribd company logo
1 of 11
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

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 ClustersDavid Ware
 
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 QueuingWSO2
 
Where next for MQTT?
Where next for MQTT?Where next for MQTT?
Where next for MQTT?Ian Craggs
 
Transport Layer In Computer Network
Transport Layer In Computer NetworkTransport Layer In Computer Network
Transport Layer In Computer NetworkDestro Destro
 
Application Layer Protocols for the IoT
Application Layer Protocols for the IoTApplication Layer Protocols for the IoT
Application Layer Protocols for the IoTDamien 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 SystemsSrinath Perera
 
Low Latency Mobile Messaging using MQTT
Low Latency Mobile Messaging using MQTTLow Latency Mobile Messaging using MQTT
Low Latency Mobile Messaging using MQTTHenrik 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 jmsSridhar 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.pdfInfoRIPRASAITSolutio
 
Ranker jms implementation
Ranker jms implementationRanker jms implementation
Ranker jms implementationEosSoftware
 
mqtt intro short
mqtt intro shortmqtt intro short
mqtt intro shortMahmutERKEN
 
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 EnterpriseEMQ
 

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 ImplementationHaci 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 GraphQLHaci Murat Yaman
 
Node.js System: The Landing
Node.js System: The LandingNode.js System: The Landing
Node.js System: The LandingHaci Murat Yaman
 
Node.js System: The Approach
Node.js System: The ApproachNode.js System: The Approach
Node.js System: The ApproachHaci 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 1Haci 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 landHaci 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

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 

Recently uploaded (20)

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 

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?