CategoryCloud

Azure Service Bus sessions: Pub/sub without autoforwarding

A

TL;DR: Azure Service Bus does not support autoforwarding from a session-enabled subscription. A direct workaround is to process each subscription as an application input, but that spreads session locks, retries, monitoring, and shutdown across several receive points. A narrowly scoped transport-owned bridge can instead move each ordered subscription stream into one session-enabled endpoint queue. The application can then apply one recoverability model. The earlier posts in my Azure Service Bus...

Azure Service Bus sessions: Delayed retries may need a hold-back

A

TL;DR: Most workflows are better off accepting out-of-order delivery and modeling the business process to cope with it. If strict order is a real requirement, however, Azure Service Bus sessions are only the start. A delayed retry can let later messages overtake the failure. Preserving processing order then requires a hold-back that records the failed message in session state and refuses to process the backlog until that message succeeds. This post starts where my earlier Azure Service Bus...

Azure Service Bus: Migrate topology one event at a time

A

TL;DR: Azure Service Bus can run an old and a new delivery path side by side while you migrate one event stream at a time. A delivery path is the route from a publisher, through a topic and subscription, to a consuming service. Create the new path before removing the old one, because duplicate delivery is easier to survive than message loss. This post is part of a short series on Azure Service Bus topology under load. The earlier posts explain filters, shared-topic contention, and failure...

Azure Service Bus: Designing for blast radius

A

TL;DR: Blast radius means how much unrelated traffic is affected when one messaging resource reaches a limit or stops making progress. If every event type shares one Azure Service Bus topic, a backed-up event stream can consume the shared topic budget and affect unrelated publishers. Splitting event streams across topics can make those failures easier to understand and contain. This post is part of a short series on Azure Service Bus topology under load. The earlier posts explain subscription...

Azure Service Bus: One topic, many subscriptions

A

TL;DR: A single Azure Service Bus topic can be a reasonable starting point for one-to-many messaging. The topic receives published messages, and subscriptions provide separate delivery views for consumers. As the number of subscriptions, filters, and messages grows, the shared topic can become a place where routing work and storage pressure meet. Splitting event streams across topics may help, but adding entities alone does not accelerate a system. This post is part of a short series on Azure...

Azure Service Bus: Count your filters

A

TL;DR: Azure Service Bus can publish one message to a topic and deliver it to multiple consumers. A topic is the shared destination, a subscription is a consumer-specific view, and a filter decides whether a message is copied to that subscription. In high-throughput systems, the number of subscription rules can matter more than the filter type itself. This is the first post in a short series on Azure Service Bus topology under load. The series looks at filter count, subscription fan-out (one...

Azure Service Bus: Earn the redesign

A
A picture explaining the earn the redesign lifecycle form the post

TL;DR: Micro-optimizations are not a substitute for design work. They are how you earn the right to redesign. In the Azure Service Bus SDK, repeated work in the Body property first led to smaller allocation fixes. Once those fixes exposed the shape of the problem, a small internal redesign made the code faster, clearer, and easier to reason about. “This code is bad. We should rewrite it.” Most developers have heard that sentence. Many have said it. I have too. The problem is not...

Small optimizations, large systems: tightening the Event Hubs partition key hash loop

S

TL;DR: After temporary allocations were removed from the Azure Event Hubs partition-key encoding path, the Jenkins lookup3 hash loop itself became the next interesting place to look. Tightening that loop reduced CPU overhead, but it also raised the bar for review, portability, and correctness. I like performance work most when it starts with a boring question: why is this small method showing up so much? That question came up while looking at the Azure Event Hubs client. Event Hubs is built for...

Small optimizations, large systems: removing allocations from Event Hubs partition key hashing

S

TL;DR: Small code paths become expensive when cloud workloads execute them millions of times. The Azure Event Hubs partition key resolver is one of those paths. By removing temporary allocations from the partition-key encoding path, the Azure Event Hubs SDK reduced garbage collection pressure on a publishing hot path. I like performance work most when it starts with a boring question: why is this small method showing up so much? That question came up while looking at the Azure Event Hubs client...

Azure Service Bus .NET SDK Deep Dive – Deduplication

A

Explains how de-duplication can help to make sure a message is only delivered once within a certain time period, for more posts in this series go to Contents. In the posts atomic sends and send via I showed ways to achieve atomicity for a group of messages or messages that are sent out as part of an outgoing message. Let’s have a look at a piece of code that looks super simply but might always behave like you’d wish it should behave: public async Task<IActionResult>...

Recent Posts