Need advice about which tool to choose?Ask the StackShare community!

Azure Service Bus

268
526
+ 1
7
MQTT

592
570
+ 1
7
Add tool

Azure Service Bus vs MQTT: What are the differences?

Introduction

Azure Service Bus and MQTT are both messaging protocols used for communication between devices and applications. While they serve a similar purpose, there are several key differences between the two.

  1. Scalability and Flexibility: Azure Service Bus is a cloud-based messaging service provided by Microsoft Azure, offering highly scalable and flexible messaging capabilities. It allows for asynchronous communication between different applications and services. MQTT, on the other hand, is a lightweight and efficient messaging protocol designed for constrained devices and low-bandwidth networks. It is particularly suitable for Internet of Things (IoT) scenarios where resources are limited.

  2. Protocol Design: Azure Service Bus uses a request-response model where the sender and receiver need not be online simultaneously. It provides features like message queues and topics, allowing for reliable and durable messaging. MQTT, on the other hand, follows a publish-subscribe model where clients can publish messages to topics and subscribers can receive messages from those topics. It is designed for efficient and low-latency communication.

  3. Reliability and Persistence: Azure Service Bus ensures message durability and persistence by storing messages in its message queues or topics until they are consumed by the receivers. In case of network disruptions or receiver unavailability, the messages are stored and delivered when the connection is restored. MQTT, on the other hand, relies on the Quality of Service (QoS) levels specified during message publication. It supports three levels of QoS, including at most once, at least once, and exactly once delivery. The QoS level chosen affects the reliability and persistence of the messages.

  4. Authentication and Security: Azure Service Bus provides various authentication mechanisms to ensure secure communication, including shared access signatures, Azure Active Directory, and Transport Layer Security (TLS) encryption. It also supports message-level security using message encryption. MQTT, on the other hand, primarily relies on Transport Layer Security (TLS) encryption for secure communication. It also provides support for username/password-based authentication and client certificates.

  5. Language and Platform Support: Azure Service Bus provides SDKs and libraries for different programming languages such as .NET, Java, Python, etc. It also integrates well with other Azure services like Azure Functions, Azure Logic Apps, etc. MQTT, on the other hand, has MQTT client libraries available for a wide range of programming languages and platforms, making it highly portable and compatible with diverse systems.

  6. Level of Overhead: While Azure Service Bus provides rich messaging features and capabilities, it comes with a certain level of complexity and overhead due to the cloud infrastructure it relies on. MQTT, being a lightweight and efficient protocol, has lower overhead in terms of bandwidth and processing requirements, making it suitable for resource-constrained devices and networks.

In Summary, Azure Service Bus and MQTT differ in terms of scalability, protocol design, reliability, authentication, language and platform support, and overhead. Azure Service Bus is a cloud-based messaging service offering scalability and flexibility, while MQTT is a lightweight protocol designed for constrained devices and low-bandwidth networks.

Advice on Azure Service Bus and MQTT
André Almeida
Technology Manager at GS1 Portugal - Codipor · | 5 upvotes · 411.7K views
Needs advice
on
Azure Service BusAzure Service Bus
and
RabbitMQRabbitMQ

Hello dear developers, our company is starting a new project for a new Web App, and we are currently designing the Architecture (we will be using .NET Core). We want to embark on something new, so we are thinking about migrating from a monolithic perspective to a microservices perspective. We wish to containerize those microservices and make them independent from each other. Is it the best way for microservices to communicate with each other via ESB, or is there a new way of doing this? Maybe complementing with an API Gateway? Can you recommend something else different than the two tools I provided?

We want something good for Cost/Benefit; performance should be high too (but not the primary constraint).

Thank you very much in advance :)

See more
Replies (2)

A Pro of Azure Service Bus is reliability and persistence: you can send message when receiver is offline; receiver can read it when it back online. A Cons is costs and message size. You can consider also SignalR

See more
Recommends

There are many different messaging frameworks available for IPC use. It's not really a question of how "new" the technology is, but what you need it to do. Azure Service Bus can be a great service to use, but it can also take a lot of effort to administrate and maintain that can make it costly to use unless you need the more advanced features it offers for routing, sequencing, delivery, etc. I would recommend checking out this link to get a basic idea of different messaging architectures. These only cover Azure services, but there are many other solutions that use similar architectural models.

https://docs.microsoft.com/en-us/azure/event-grid/compare-messaging-services

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Azure Service Bus
Pros of MQTT
  • 4
    Easy Integration with .Net
  • 2
    Cloud Native
  • 1
    Use while high messaging need
  • 3
    Varying levels of Quality of Service to fit a range of
  • 2
    Lightweight with a relatively small data footprint
  • 2
    Very easy to configure and use with open source tools

Sign up to add or upvote prosMake informed product decisions

Cons of Azure Service Bus
Cons of MQTT
  • 1
    Limited features in Basic tier
  • 1
    Skills can only be used in Azure - vendor lock-in
  • 1
    Lacking in JMS support
  • 1
    Observability of messages in the queue is lacking
  • 1
    Easy to configure in an unsecure manner

Sign up to add or upvote consMake informed product decisions

What is Azure Service Bus?

It is a cloud messaging system for connecting apps and devices across public and private clouds. You can depend on it when you need highly-reliable cloud messaging service between applications and services, even when one or more is offline.

What is MQTT?

It was designed as an extremely lightweight publish/subscribe messaging transport. It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium.

Need advice about which tool to choose?Ask the StackShare community!

What companies use Azure Service Bus?
What companies use MQTT?
See which teams inside your own company are using Azure Service Bus or MQTT.
Sign up for StackShare EnterpriseLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with Azure Service Bus?
What tools integrate with MQTT?

Sign up to get full access to all the tool integrationsMake informed product decisions

What are some alternatives to Azure Service Bus and MQTT?
NServiceBus
Performance, scalability, pub/sub, reliable integration, workflow orchestration, and everything else you could possibly want in a service bus.
RabbitMQ
RabbitMQ gives your applications a common platform to send and receive messages, and your messages a safe place to live until received.
Kafka
Kafka is a distributed, partitioned, replicated commit log service. It provides the functionality of a messaging system, but with a unique design.
MSMQ
This technology enables applications running at different times to communicate across heterogeneous networks and systems that may be temporarily offline. Applications send messages to queues and read messages from queues.
IBM MQ
It is a messaging middleware that simplifies and accelerates the integration of diverse applications and business data across multiple platforms. It offers proven, enterprise-grade messaging capabilities that skillfully and safely move information.
See all alternatives