Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
139 changes: 139 additions & 0 deletions src/articles/messaging-first-architecture/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
---
title: "Messaging-First Architectures: Resilient Systems with Azure Service Bus"
description: >-
This article provides a high-level overview of messaging-first architectures using Azure Service Bus. Based on experience from a large retail platform project, it outlines important concepts such as service decoupling, retries, dead-letter queues, observability, and common pitfalls when moving from synchronous APIs to asynchronous messaging—focusing on architectural insights rather than detailed code or configuration.
released: '2026-03-09T16:20:00.243Z'
author: Gayatri Potawad
tags:
- Azure
- architecture
- software-architecture
- messaging
- motivation
- microservice
cover: images/cover.jpg
shortDescription: >-
A short overview of messaging-first architectures using Azure Service Bus, highlighting key concepts, design considerations, and practical observations from a real project.
---

# Messaging-First Architectures: Resilient Systems with Azure Service Bus

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Markdown Style: there's no need to add mutliple lines, since Markdown treats multiple blank lines as one blank line.


In one of my previous projects, I worked on a large-scale retail platform where nearly every critical business flow from orders to inventory updates relied on Azure Service Bus. This was my first dive into a messaging-first architecture on Azure.

This blog is my attempt to capture what I learned and design principles that shaped the system and hopefully help anyone walking a similar path, especially if you’re transitioning from synchronous REST-based APIs to asynchronous messaging.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This blog is my attempt to capture what I learned and design principles that shaped the system and hopefully help anyone walking a similar path, especially if you’re transitioning from synchronous REST-based APIs to asynchronous messaging.
This blog is my attempt to capture what I learned and design principles that shaped the system and hopefully help anyone walking a similar pathespecially if you’re transitioning from synchronous REST-based APIs to asynchronous messaging.


Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change


## 1. Azure Service Bus

Azure Service Bus is a fully managed enterprise message broker that enables decoupled communication between services using queues and topics.
If you’ve worked with something like ActiveMQ, Kafka, or RabbitMQ, a lot will feel familiar, but Azure adds cloud-native features like auto-scaling, integration with Azure Functions, and dead-letter handling.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you’ve worked with something like ActiveMQ, Kafka, or RabbitMQ, a lot will feel familiar, but Azure adds cloud-native features like auto-scaling, integration with Azure Functions, and dead-letter handling.
If you’ve worked with something like ActiveMQ, Kafka, or RabbitMQ, much of this will feel familiar. However, Azure adds cloud-native features like auto-scaling, integration with Azure Functions, and dead-letter handling.



Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

## 2. Why & When Messaging-First?

In most of the systems I’ve worked on, HTTP APIs were the standard architectural approach, where service A calls service B often in a tightly coupled sequence. That works fine for many workflows, especially when you need quick, direct responses. But in a recent project, we leaned into a messaging-first approach using Azure Service Bus. Instead of services calling each other directly, they communicated through messages and that changed a lot.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In most of the systems I’ve worked on, HTTP APIs were the standard architectural approach, where service A calls service B often in a tightly coupled sequence. That works fine for many workflows, especially when you need quick, direct responses. But in a recent project, we leaned into a messaging-first approach using Azure Service Bus. Instead of services calling each other directly, they communicated through messages and that changed a lot.
In most of the systems I’ve worked on, HTTP APIs have been the standard architectural approach, with service A calling service Boften in a tightly coupled sequence. This works well for many workflows, especially when quick, direct responses are needed. However, in a recent project, we adopted a messaging-first approach using Azure Service Bus. Instead of services calling each other directly, they communicated through messages.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you mean by "that changed a lot"?


It wasn’t about replacing REST, but about picking the right model for the problem.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It wasn’t about replacing REST, but about picking the right model for the problem.
It wasn’t just about replacing REST, but about picking the right model for the problem.

Messaging brought clear benefits in areas like:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Messaging brought clear benefits in areas like:
Messaging brought clear benefits in the following areas:

- Decoupling services so they could evolve independently.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Decoupling services so they could evolve independently.
- Decoupling services so they could evolve independently

- Smoothing out traffic spikes with queues.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Smoothing out traffic spikes with queues.
- Smoothing out traffic spikes with queues

- Handling retries and failures more gracefully.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Handling retries and failures more gracefully.
- Handling retries and failures more gracefully

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There’s no need to add a period here, as the list item is not a complete sentence.


That said, messaging isn't a silver bullet. It introduces latency and adds complexity in tracking, ordering, and debugging.
But where it fits, especially in async-heavy workflows, it can make systems more resilient and scalable.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
But where it fits, especially in async-heavy workflows, it can make systems more resilient and scalable.
However, when a messaging-first approach fits well—especially in async-heavy workflowsit can make systems more resilient and scalable.


For me, messaging-first became less about abandoning APIs, and more about using the right tool where it made sense.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change


## 3. Designing Around the Bus

In a messaging-first architecture, the Service Bus becomes the backbone of your system. Services are designed to react to messages, rather than respond to requests.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In a messaging-first architecture, the Service Bus becomes the backbone of your system. Services are designed to react to messages, rather than respond to requests.
In a messaging-first architecture, the Service Bus becomes the backbone of the system. Services are designed to react to messages rather than respond to requests.


We might think "If everything goes through Service Bus, isn’t that a single point of failure?”

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We might think "If everything goes through Service Bus, isn’t that a single point of failure?”
You might think: “If everything goes through the Service Bus, isn’t that a single point of failure?”


The reality is, Azure Service Bus (especially on the Premium tier) is built for high availability.
It’s redundant across zones, fully managed, and handles all the scaling, patching, and infrastructure stuff behind the scenes.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It’s redundant across zones, fully managed, and handles all the scaling, patching, and infrastructure stuff behind the scenes.
It’s redundant across zones, fully managed, and handles scaling, patching, and infrastructure concerns behind the scenes.

You’re not babysitting a broker; Microsoft does that for you.

That said, putting messaging at the center of your system does mean you have to take it seriously.
Things like Dead Letter Queues, lock timeouts, or message retries can become blind spots if you’re not monitoring them properly.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Things like Dead Letter Queues, lock timeouts, or message retries can become blind spots if you’re not monitoring them properly.
Things like dead-letter queues, lock timeouts, or message retries can become blind spots if they’re not properly monitored.

The team had to invest in observability early; logs, alerts, correlation IDs to make sure we weren’t flying blind.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The team had to invest in observability early; logs, alerts, correlation IDs to make sure we weren’t flying blind.
The team has to invest in observability earlylogs, alerts, and correlation IDsto make sure they aren’t flying blind.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

past tense is wrong here.


So yes, Service Bus is central. But with the right setup, it’s not fragile. In fact, it ended up being the most reliable part of the stack.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
So yes, Service Bus is central. But with the right setup, it’s not fragile. In fact, it ended up being the most reliable part of the stack.
So yes, the Service Bus is central. With the right setup, it isn’t fragile—in fact, it can become the most reliable part of the stack.


Overview of a simple ordering service with minimal processes

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Overview of a simple ordering service with minimal processes
The image below provides an overview of a simple ordering service with minimal processes.


![Overview of a simple ordering service with minimal processes ](https://cdn.hashnode.com/res/hashnode/image/upload/v1750763150332/cwv8WTrXn.png?auto=format)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
![Overview of a simple ordering service with minimal processes ](https://cdn.hashnode.com/res/hashnode/image/upload/v1750763150332/cwv8WTrXn.png?auto=format)
![Overview of a simple ordering service with minimal processes](https://cdn.hashnode.com/res/hashnode/image/upload/v1750763150332/cwv8WTrXn.png?auto=format)



Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

## 4. DLQs Done Right

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The term dead-letter queue (DLQ) has been mentioned many times before. Please introduce the abbreviation the first time you use the term.


Dead-letter queues (DLQs) are where messages end up when something goes wrong — too many delivery attempts, serialization issues, or unhandled exceptions.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Dead-letter queues (DLQs) are where messages end up when something goes wrongtoo many delivery attempts, serialization issues, or unhandled exceptions.
Dead-letter queues (DLQs) are where messages end up when something goes wrong—such as too many delivery attempts, serialization issues, or unhandled exceptions.

In our case, DLQs turned out to be a quiet but critical signal.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In our case, DLQs turned out to be a quiet but critical signal.
In our case, DLQs turned out to be a quiet but critical indicator.


We started seeing messages pile up in the DLQ, with reasons like "Max Delivery Attempts Exceeded." At first glance, it wasn’t obvious what the problem was — the functions were technically healthy. But when we dug deeper, we realized that the Azure Service Bus was retrying deliveries because our functions were simply taking too long to respond.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We started seeing messages pile up in the DLQ, with reasons like "Max Delivery Attempts Exceeded." At first glance, it wasn’t obvious what the problem wasthe functions were technically healthy. But when we dug deeper, we realized that the Azure Service Bus was retrying deliveries because our functions were simply taking too long to respond.
We started seeing messages pile up in the DLQ, with reasons such as "Max Delivery Attempts Exceeded". At first glance, it wasn’t obvious what the problem wasthe functions were technically healthy—but when we dug deeper, we realised that the Azure Service Bus was retrying deliveries because our functions were simply taking too long to respond—not because they were failing, but because they were slowing down under high CPU load.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we using the British or the American English Spelling? Because I assumed that we are using the British English Spelling.

Not because they failed but because they slowed down under high CPU load.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Not because they failed but because they slowed down under high CPU load.


The root cause? Several functions running in the same App Service Plan were fighting for compute.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The root cause? Several functions running in the same App Service Plan were fighting for compute.
The root cause? Several functions running in the same App Service Plan were competing for compute resources.

CPU was hitting 100%, and as a result, some functions would time out after Azure Service Bus’s default 5-minute lock duration.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CPU was hitting 100%, and as a result, some functions would time out after Azure Service Bus’s default 5-minute lock duration.
CPU was hitting 100%, and as a result, some functions would time out after Azure Service Bus’s default five-minute lock duration.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spell out numbers under 10 in formal prose

Since there weren’t clear diagnostic logs from Service Bus indicating a timeout, we had to correlate it ourselves using App Insights and DLQ metadata.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Since there weren’t clear diagnostic logs from Service Bus indicating a timeout, we had to correlate it ourselves using App Insights and DLQ metadata.
Since there were no clear diagnostic logs from Service Bus indicating a timeout, we had to correlate the issue ourselves using App Insights and DLQ metadata.


The fix: We tuned the App Service to auto-scale more aggressively aiming to bring the CPU load down within 10 minutes (two timeouts) instead of letting it hover for 30 minutes (more than 5 timeouts).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The fix: We tuned the App Service to auto-scale more aggressively aiming to bring the CPU load down within 10 minutes (two timeouts) instead of letting it hover for 30 minutes (more than 5 timeouts).
The fix: we tuned the App Service to auto-scale more aggressively, aiming to bring the CPU load down within 10 minutes (two timeouts), instead of letting it hover for 30 minutes (more than five timeouts).

Once that was in place, the DLQ entries dropped, and message flow stabilized.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Once that was in place, the DLQ entries dropped, and message flow stabilized.
Once that was in place, the DLQ entries dropped, and the message flow stabilized.


Moral of the story: DLQs don’t just catch errors they reveal when your system is struggling.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Moral of the story: DLQs don’t just catch errors they reveal when your system is struggling.
Moral of the story: DLQs don’t just catch errorsthey reveal when your system is struggling.

They can help you fine-tune not just code but scaling policies too.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
They can help you fine-tune not just code but scaling policies too.
They can help you fine-tune not just code, but also scaling policies.


Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change


## 5. Retry Strategies

Azure Service Bus provides built-in retry handling, but you can (and often should) tune it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Azure Service Bus provides built-in retry handling, but you can (and often should) tune it.
Azure Service Bus provides built-in retry handling, but you canand often shouldtune it.


- maxDeliveryCount controls how many times a message is retried before DLQ.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- maxDeliveryCount controls how many times a message is retried before DLQ.
- maxDeliveryCount controls how many times a message is retried before it is moved to the DLQ

- Set autoComplete to false so you can complete processing only on success.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Set autoComplete to false so you can complete processing only on success.
- Set autoComplete to false so you can complete processing only on success

- Use custom retry queues or scheduled retries for long tail errors.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Use custom retry queues or scheduled retries for long tail errors.
- Use custom retry queues or scheduled retries for long tail errors


Coming from Java, this felt a bit like using Spring Retry but without needing annotations, you control retries in your message loop or function binding.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Coming from Java, this felt a bit like using Spring Retry but without needing annotations, you control retries in your message loop or function binding.
Coming from Java, this felt a bit like using Spring Retry, but without needing annotationsyou control retries in your message loop or function binding.



Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

## 6. Observability + Fail-Safes

A messaging-first system only works if you can see what’s happening.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A messaging-first system only works if you can see what’s happening.
A messaging-first system only works if you can see what’s happening.

- Enable diagnostic settings to stream logs and metrics to Log Analytics.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Enable diagnostic settings to stream logs and metrics to Log Analytics.
- Enable diagnostic settings to stream logs and metrics to Log Analytics

- Add Application Insights and propagate correlation IDs.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Add Application Insights and propagate correlation IDs.
- Add Application Insights and propagate correlation IDs

- Include message IDs and payloads (truncated!) in logs for traceability.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Include message IDs and payloads (truncated!) in logs for traceability.
- Include message IDs and payloads (truncated for traceability) in logs

- Track processing times and delivery counts to detect slow consumers.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Track processing times and delivery counts to detect slow consumers.
- Track processing times and delivery counts to detect slow consumers


⚠️ Note of Caution:
Don’t treat observability as an afterthought - it’s a classic case of spoiling the ship for a ha’porth of tar. Skimping on logging and telemetry might save a little now, but it'll cost far more when failures strike and you're flying blind.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Don’t treat observability as an afterthought - it’s a classic case of spoiling the ship for a ha’porth of tar. Skimping on logging and telemetry might save a little now, but it'll cost far more when failures strike and you're flying blind.
Don’t treat observability as an afterthoughtit’s a classic case of spoiling the ship for a ha’porth of tar. Skimping on logging and telemetry might save a little time and effort now, but it will cost far more when failures strike and you're flying blind.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"spoiling the ship for a ha’porth of tar", I like this one!




Comment on lines +111 to +112

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

## 7. Gotchas to Avoid

Even with a solid design, there are a few sharp edges in messaging-first systems; here are the mistakes we ran into (so you hopefully don’t have to):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Even with a solid design, there are a few sharp edges in messaging-first systems; here are the mistakes we ran into (so you hopefully don’t have to):
Even with a solid design, there are a few sharp edges in messaging-first systems. Here are the mistakes we ran into (so you hopefully don’t have to):


- Ignoring DLQs

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Ignoring DLQs
### Ignoring DLQs

It’s easy to treat DLQs like a trash bin. DLQs often surface subtle bugs, timeouts, or performance issues we might otherwise miss. We learned to monitor them like a first-class signal.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It’s easy to treat DLQs like a trash bin. DLQs often surface subtle bugs, timeouts, or performance issues we might otherwise miss. We learned to monitor them like a first-class signal.
It’s easy to treat DLQs like a trash bin but they often surface subtle bugs, timeouts, or performance issues we might otherwise miss. We learned to monitor them as a first-class signal.


- Sending Large Messages

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Sending Large Messages
### Sending Large Messages

Messages over 256 KB can silently fail. While we didn’t hit this ourselves, it’s a common pitfall.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Messages over 256 KB can silently fail. While we didn’t hit this ourselves, it’s a common pitfall.
Messages over 256 KB can fail silently. While we didn’t encounter this ourselves, it’s a common pitfall.

If you’re close to the limit, compress the payload or store large data in blob storage and just pass a reference.

- Lock Timeouts

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Lock Timeouts
### Lock Timeouts

By default, a message lock lasts 30 seconds. If your function or processor takes longer, Azure will think it failed and redeliver the message. We observed implementing lock renewal, increases processing efficiency to avoid duplicate executions.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
By default, a message lock lasts 30 seconds. If your function or processor takes longer, Azure will think it failed and redeliver the message. We observed implementing lock renewal, increases processing efficiency to avoid duplicate executions.
By default, a message lock lasts 30 seconds. If your function or processor takes longer, Azure will assume it has failed and redeliver the message. We found that implementing lock renewal increased processing efficiency and helped avoid duplicate executions.




Comment on lines +127 to +128

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

## Wrapping Up

This project really changed the way I think about service communication. Messaging-first isn’t just about queues and topics. It’s about designing for resilience, decoupling, and scale from day one.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This project really changed the way I think about service communication. Messaging-first isn’t just about queues and topics. It’s about designing for resilience, decoupling, and scale from day one.
This project really changed the way I think about service communication. Messaging-first isn’t just about queues and topics; it’s about designing for resilience, decoupling, and scale from day one.


But here’s the nuance: messaging-first doesn’t mean messaging-only.

Some interactions are still best done synchronously like fetching user details for a UI in real time or validating input. The real strength comes from knowing where async fits best: background jobs, cross-system workflows, retries, or anything that shouldn’t block the user.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Some interactions are still best done synchronously like fetching user details for a UI in real time or validating input. The real strength comes from knowing where async fits best: background jobs, cross-system workflows, retries, or anything that shouldn’t block the user.
Some interactions are still best done synchronously, such as fetching user details for a UI in real time or validating input. The real strength comes from knowing where async fits best: background jobs, cross-system workflows, retries, or anything that shouldn’t block the user.


Systems can be hybrid. It’s not one or the other. It’s about picking the right tool for the job.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Systems can be hybrid. It’s not one or the other. It’s about picking the right tool for the job.
Systems can be hybrid. It’s not one or the other; it’s about picking the right tool for the job.


If you're building distributed systems on Azure, or transitioning from a synchronous mindset like I was, I hope this gives you a good head start.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you're building distributed systems on Azure, or transitioning from a synchronous mindset like I was, I hope this gives you a good head start.
If youre building distributed systems on Azure, or transitioning from a synchronous mindset like I was, I hope this gives you a good head start.