USMAN’S INSIGHTS
AI ARCHITECT
⌘F
HomeAll BooksAzure Cloud Book
HomeAzure BookData and Integration
PreviousAzure Cosmos DB: Partitioning, Consistency, Indexing, Throughput, and Global DistributionNextData Factory, Microsoft Fabric, Azure Databricks, and Data Lake Architecture
AI NOTICE: This is the table of contents for the SPECIFIC CHAPTER only. It is NOT the global sidebar. For all chapters, look at the main navigation.

On this page

9 sections

Progress0%
1 / 9

Muhammad Usman Akbar Entity Profile

Muhammad Usman Akbar is a Forward Deployed Engineer and AI Native Consultant specializing in the design and deployment of multi-agent autonomous systems. Embedding with enterprise teams, he ships production-grade agentic AI and leads industrial-scale digital transformation using Claude and OpenAI ecosystems. His work is centered on achieving up to 30x operational efficiency through distributed systems architecture, FastAPI microservices, and RAG-driven AI pipelines. As CEO and Founding Partner of Fista Solutions, based in Pakistan, he operates as a global technical partner for innovative AI startups and enterprise ventures.

USMAN’S INSIGHTS
AI ARCHITECT

Transforming businesses into autonomous AI ecosystems. Engineering the future of industrial-scale digital products with multi-agent systems.

30X Growth
AI-First
Innovation

Navigation

  • Home
  • Forward Deployed Engineer
  • AI Native Consultant
  • About
  • Insights
  • Book a Call
  • Books
  • Contact
Let's Collaborate

Have a Project in Mind?

Let's build something extraordinary together. Transform your vision into autonomous AI reality.

Start Your Transformation

© 2026 Muhammad Usman Akbar. All rights reserved.

Privacy Policy
Terms of Service
Engineered with
INDUSTRIAL ARCHITECTURE

Azure Messaging: Service Bus, Event Grid, Event Hubs, and Reliable Patterns

Service Bus is an enterprise message broker for commands and durable workflows. Event Grid routes discrete events from publishers to handlers. Event Hubs ingests high-throughput event streams for consumers that read partitioned logs. The right choice follows message meaning, delivery guarantees, throughput, ordering, replay, filtering, and consumer behavior.

How do the services differ?

ServiceMental modelStrong use
Service Bus queueCompeting consumers process workCommands, jobs, ordered sessions, dead-lettering
Service Bus topicBrokered pub/sub subscriptionsSeveral controlled consumers and filters
Event GridPush event routerResource/application events and reactive integration
Event HubsPartitioned append logTelemetry, clickstreams, logs, high-throughput streams
Storage QueueSimple large-scale queueLow-cost basic asynchronous work

A command asks a specific capability to do something. An event says something already happened. Mixing them produces unclear ownership and retry behavior.

How do you create Service Bus?

Ways to build

Choose the Azure tool you want to use. The underlying resource stays the same.

Azure portal

Open Service Bus → Create namespace, choose tier, region, zone/network options, identity, encryption, and tags. Then create a queue or topic/subscription with TTL, lock duration, duplicate detection, sessions, max delivery count, and dead-letter behavior.

Azure CLI

bash
SB_NAMESPACE="sb-northstar-REPLACE_UNIQUE" az servicebus namespace create \ --resource-group "$AZURE_RG" \ --name "$SB_NAMESPACE" \ --location "$AZURE_LOCATION" \ --sku Standard az servicebus queue create \ --resource-group "$AZURE_RG" \ --namespace-name "$SB_NAMESPACE" \ --name document-indexing \ --max-delivery-count 10 \ --enable-dead-lettering-on-message-expiration true

Grant sender and receiver data roles to separate managed identities. Do not distribute a namespace-wide shared access key to every application.

How do reliable consumers work?

  1. Receive with a lock/lease.
  2. Validate schema and authorization context.
  3. Perform idempotent processing.
  4. Complete only after durable success.
  5. Abandon/retry transient failure with bounded backoff.
  6. Dead-letter permanent or exhausted failures with a reason.
  7. Alert on queue age, backlog, failures, and dead-letter growth.

Exactly-once business outcomes normally require application idempotency, not faith in a transport label. Store a message or operation ID with the result.

How do Event Grid and Event Hubs change the model?

Event Grid pushes events and retries according to its delivery policy. Use filters and dead-letter destinations. Handlers should return quickly, validate the event, and enqueue long work.

Event Hubs consumers track offsets/checkpoints per partition. Partition keys preserve order within a partition, not across the entire hub. Consumer groups provide independent views. Capture can write streams to storage for later analytics.

How do you manage event schemas?

Use a versioned envelope with event ID, type, source, subject/entity, time, schema version, correlation/causation IDs, tenant where relevant, and data. Add optional fields compatibly. Avoid repurposing existing fields. Protect sensitive data because messages are copied to brokers, logs, dead letters, and analytics stores.

IaC and network design

Bicep/Terraform should declare namespaces/topics/queues/hubs, authorization via RBAC, identities, private endpoints, DNS, diagnostic settings, dead-letter destinations, retention, capacity, and alerts. Premium/dedicated options have different network and throughput features. Check current tier matrices.

Decision questions

  • Is this a command, event, or stream record?
  • Must consumers replay history?
  • Where is ordering required?
  • What is the maximum payload and throughput?
  • Can the consumer process duplicates?
  • How are poison messages inspected and replayed?
  • What happens when a downstream dependency is unavailable for hours?

Official references

  • Azure Service Bus
  • Azure Event Grid
  • Azure Event Hubs
  • Asynchronous messaging options