Delivering Messages Made Easy With Azure Service Bus

Deing Messages Made Easy With Azure Service Bus

Integrating two differ systems is oft complicated and comes up with lots of challges with respect to the availability of both systems, processing speed, scaling and many more. Amongst many recommdations for designing and developing applications for the cloud, abling asynchronous communication betwe multiple services plays a vital role in achieving the reliability, scalability and the efficicy of the system.

What are Message Queues?

Message Queues is the solon to the challges faced during Integration in distributed systems. It is an effici way of abling asynchronous communications betwe differ software services.
Message Queues - AzureFollowing are three most important befits Queuing solon comes with:

1. Decoupling: Messaging queues provide a persist storage and asynchronous communication and thus the availability of one service does not impact the another. They are eligible to work in a disconnected fashion.
Decoupling - Azure. High reliability: Messaging queues use transactions to manage the message and help to roll back the transaction to recover the message, In case of a failure.
High Reliability - Azure3. Granular Scalability – Messaging queues helps to achieve granular scalability where the producer or consumer can scale on their own choice without ev impacting the other.
Granular Scalability - AzureAzure Service Bus – A managed Queuing system on Azure Cloud

Azure Service bus is a highly scalable service that helps to achieve asynchronous messaging and exchanging data among decoupled systems. Moreover, since it is a Platform as a Service (PaaS) offering from Microsoft, thus, you don’t have to manage the Infrastructure and configuration. Azure cloud manages all this for you.
Among all others, the most important feature of Azure Service Bus queue is that it guarantees messages to be deed in FIFO order, which many other queuing solons fail to provide, ev Azure Storage Queues. This makes service bus the most suitable choice than any other Message Queues, though not the only choice. However, Other features to include high availability, auditing, Geo redundancy etc.

Azure Service Bus has 3 offerings:

1. Queues
Topics and Subscriptions
3. Relays3 Azure Service Bus Offerings

1. Service Bus Queues:
The queue is an optimum choice wh we are impleming one-directional messaging and, we want to sure that only one consumer can fetch the message. This is gerally used wh both the producer and the consumer are not online at the same point in time. All the messages s by the producer are stored in the queue until consumed by the consumer or gets expired. Also, each message in the queue is idified by a unique Message-ID.
Service Bus Queues - AzureQueues come with the assumption that the message needs to be consumed by only one service. However, in practical scarios, one message need to be deed to multiple consumers on some business decisions or need to be broadcasted. To meet those requirems Service bus does have a differ offering, Topics.

. Topics and Subscriptions:
Topics also provide one-directional communication. However, it works on the publish-subscribe principle where the same message can be consumed by more than one consumer. A single topic may have multiple subscriptions associated with it. A Subscription is somewhat like Queue. Wh the topic receives the message, it des it to all the relevant subscriptions or distributes based on the subscription filters.

3. Relays:
Unlike Queues and Topics, Relays provides more sort of bi-directional communication. Relays do not support brokered messaging i.e. they don’t store any messages instead simply passes the message from one service to the other. Therefore, both the publisher and subscriber need to be active at the same point in time in case of relays. Relays are automatically created and deleted in a service bus namespace i.e. they need not be created beforehand and deleted post use by services.

Azure Service Bus Architecture
The Azure Service Bus architecture is depicted in the figure below:

Some Important Limits and Quotas

Advanced Features of Azure Service Bus

Azure Service Bus also has some advanced features that can help you to solve most complex messaging problems. The key features are ed below:
Advanced Features of Azure Service Bus1. Dead Lettering
Service bus provides dead letter subqueue to store messages that could not be deed or processed. Dead letter queues can be used to expired or poisoned messages from the par queue. Those messages th can be retrieved for further investigations. Dead letter queues need not be created manually but are automatically created with the queue.

. Transactions
Service bus provides transactions to group multiple together into one execon scope. This sures that all the within a group either succeed or fail together.

3. Duplicate detection
abling Duplicate detection helps to idify duplicate messages added on the basis of the unique message id. The duplicate message could be added by an application on restart of unexpected failure or exception scarios not handled. Such messages need not be handled manually by the application because the service bus automatically handles those messages.

4. Batch processing
Batch processing feature of Azure service bus helps to add and retrieve messages in batch instead of one by one message. This extds help to the systems that have to process bulk messages.

5. Sessions
Sometimes the messages are bigger in size say more than 1 MB (maximum message size capacity of queues). Sessions help in such scarios by sding the message in parts and allowing the processing of the same only wh all the parts are received at the consumer d.


Microsoft’s PaaS offering, Azure Service Bus is really helpful in developing and impleming highly scalable services without ev care about infrastructure. It provides asynchronous communication and sures greater reliability.

Azure also lets you select from differ options in service bus – for brokered and one directional message we have Queues and Topics and for non-persist and bi-directional messages we have Relays.