Blog

Messaging for Azure Integration

Messaging for Azure Integration – Choosing the Service that Fits

There’s no doubt that Azure offers architects and developers a panoply of integration messaging services, with each suited to different architectures. Implementing Microservices?  Event Driven Architecture? Choosing the right messaging service can be daunting.

This blog aims to help simplify the section process, in highlighting the unique characteristics of each service, including available support for message ordering guarantees, pull and push models, and costs to help you choose the right solution for your project.

Messaging Vs. Event

First and foremost, messaging services are sent with the purpose of communicating specific action or response with clear intent. For instance, when a message is sent to the warehouse service, a request for a product to be prepared for pickup after a customer places an order. This message is intended for a command that requires action and expects to receive an acknowledgment from the received services.  On the other hand, messages and events don’t generally convey a publisher intent other than to inform. An event captures a fact and then conveys that fact. A consumer of the event can process the facts as they please and without fulfilling any publisher’s specific expectations.

Azure service broker services could be grouped into two main categories: the messaging-based group like Service Bus and Storage Queue, and event-based groups like Event Hub and Event Grid.

Azure Messaging Services

Azure Service Bus and Storage Queues are messaging mechanisms that store all received messages from publisher services in a queue, waiting for consumers’ services to consume these messages.

Azure Service Bus

Cost & Tiers

  • The Service Bus is offered in three different tiers; Basic, Standard and Dedicated
  • Minimum cost of 10 million operations per month for each tier based on the 2021 azure calculator
    • Basic: $11.23
    • Standards: $22.18
    • Dedicated: $6,260.48

Main Features

We recommend using the Azure Service Bus if the integration service requires the following features:

  • Message Ordering; when it’s necessary to guarantee messages to be processed in a certain order, such as FIFO (First-in, First-out) (Note that this is only supported on Standard or higher tiers, however)
  • It supports the pulling mechanism only; this could be required if the service is not available all the time or has low processing capabilities
  • Push mechanisms are not supported unless you will be using the Dedicated tier
  • Other advanced features like batching/sessions, transactions, dead-lettering, temporal control, routing and filtering, and duplicate detection

Azure Storage Queue  

Cost

  • Offered as part of Azure Storage service
  • The minimum cost of 10 million operations and 100 GB of storage per month is $8.90 (Azure Storage Pricing, 2021)

Main Features

  • Supports the pulling mechanism only
  • Storage queue doesn’t guarantee message delivery ordering
  • Able to store over 80 gigabytes of messages in a queue

Storage Queues are mainly recommended for basic services, which require basic queuing features without the need for advanced features of Azure Service Bus like order guarantees and support of high traffic of messages.

Azure Event Services

Event Hub

Event Hub is an events-based service intended to be used as a big data pipeline with very low latency and can receive and process millions of events per second.

Cost & Tiers

  • Offered in three tires Basic, Standard and Dedicated
  • Minimum cost of 10 million operations per month for each tier (Microsoft, 2021)
    • Basic: $ 11.23
    • Standards: $ 22.18
    • Dedicated: $ 4,999.77
  • The minimum cost for data capturing feature is about $100 per month

Main Features

  • Supports message ordering at all tiers, i.e., guaranteeing delivery of messages in order, such as FIFO (First-in, First-out)
  • Supports both polling and pushing mechanisms; however, it’s the service’s responsibility to keep track of the received events by storing the offset number of the last received event
  • The ability to capture the streaming data into a file for processing and analysis. 
  • Enables rapid data retrieval for real-time processing as well as a repeated replay of stored raw data

Event Grid

Event Grid enables event-driven, reactive programming. It uses a publish-subscribe model;  events are pushed to subscribers as soon as they occur.

Cost

  • The event grid doesn’t have different tiers, but the minimum cost for 10 million operations per month is about $8.16

Main Features

  • No support for event ordering or pulling mechanism
  • Supports pushing mechanism
  • guaranteeing at least once delivery
  • Event Grid supports dead-lettering for events that aren’t delivered to an endpoint
  • Provides out of the box integration with various Azure services like Azure Functions and Logic Apps
  • Event Grid isn’t a data pipeline and doesn’t deliver the actual data object that was updated

Still feeling lost?

Follow the decision workflow diagram below for a snapshot on which service best suits your integration project. 

Final Thought

It’s hard to draw sharp lines between the various use cases of each service. So, the solution architect could employ a combination of different services to exploit the best attributes of each service. Azure service brokers don’t force solution architectures into hard decisions when choosing between services, and it’s common for a single system to use different service brokers.