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

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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 

Recently uploaded (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 

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?